using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; 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.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.AI.Walker; using EntityStates.Bandit2; using EntityStates.Barrel; using EntityStates.Bison; using EntityStates.BrotherMonster; using EntityStates.Captain.Weapon; using EntityStates.Chirr; using EntityStates.Chirr.Claws; using EntityStates.Chirr.Wings; using EntityStates.Commando; using EntityStates.Commando.CommandoWeapon; using EntityStates.Drone; using EntityStates.DroneTable; using EntityStates.DropPod; using EntityStates.Engi.EngiMissilePainter; using EntityStates.Events; using EntityStates.Generic; using EntityStates.GolemMonster; using EntityStates.GravekeeperBoss; using EntityStates.Huntress; using EntityStates.ImpBossMonster; using EntityStates.Interactables.StoneGate; using EntityStates.Knight; using EntityStates.LemurianMonster; using EntityStates.LunarGolem; using EntityStates.LunarWisp; using EntityStates.Merc; using EntityStates.MiniMushroom; using EntityStates.NemMerc; using EntityStates.NullifierMonster; using EntityStates.Pickups.Augury; using EntityStates.Toolbot; using EntityStates.Trader.Bag; using HG; using HG.BlendableTypes; using HG.Reflection; using IL.EntityStates.AI.Walker; using IL.RoR2; using IL.RoR2.UI; using JetBrains.Annotations; using KinematicCharacterController; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using Moonstorm; using Moonstorm.AddressableAssets; using Moonstorm.Components; using Moonstorm.Config; using Moonstorm.Loaders; using Moonstorm.Starstorm2; using Moonstorm.Starstorm2.Artifacts; using Moonstorm.Starstorm2.Buffs; using Moonstorm.Starstorm2.Components; using Moonstorm.Starstorm2.DamageTypes; using Moonstorm.Starstorm2.Equipments; using Moonstorm.Starstorm2.Interactables; using Moonstorm.Starstorm2.Items; using Moonstorm.Starstorm2.Modules; using Moonstorm.Starstorm2.Orbs; using Moonstorm.Starstorm2.PostProcess; using Moonstorm.Starstorm2.ScriptableObjects; using Moonstorm.Starstorm2.Survivors; using On.EntityStates; using On.EntityStates.Drone; using On.EntityStates.Interactables.StoneGate; using On.EntityStates.Toolbot; using On.RoR2; using On.RoR2.CharacterAI; using On.RoR2.Items; using On.RoR2.Orbs; using On.RoR2.Projectile; using On.RoR2.UI; using On.RoR2.UI.MainMenu; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.ScriptableObjects; using R2API.Utils; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RoR2; using RoR2.Achievements; using RoR2.Achievements.Artifacts; using RoR2.Artifacts; using RoR2.Audio; using RoR2.CharacterAI; using RoR2.ExpansionManagement; using RoR2.HudOverlay; using RoR2.Items; using RoR2.Navigation; using RoR2.Networking; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using RoR2.UI.MainMenu; using TMPro; using ThreeEyedGames; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering.PostProcessing; using UnityEngine.SceneManagement; 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] internal sealed class IsReadOnlyAttribute : Attribute { } } public class AnimEquip : MonoBehaviour { public Transform equip; public Transform unequip; private int equipped = -1; public void EquipKnife(int equip) { if (equip != equipped) { equipped = equip; bool flag = equip == 1; if (Object.op_Implicit((Object)(object)this.equip)) { ((Component)this.equip).gameObject.SetActive(flag); } if (Object.op_Implicit((Object)(object)unequip)) { ((Component)unequip).gameObject.SetActive(!flag); } } } } 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(); ((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(); ((Transform)rectTransform).localScale = new Vector3(1.2f, 1f, 0f); } private void FixedUpdate() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) ((Transform)rectTransform).localScale = new Vector3(1.2f, 1f, 0f); } } public class VFXListComponent : MonoBehaviour { public List VFXParticles = new List(); 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); } } } namespace Assets.Starstorm2.ScriptableObjects { [CreateAssetMenu(menuName = "Starstorm2/SkillDef/BeastmasterSkillDef")] internal class BeastmasterSkillDef : SkillDef { protected class InstanceData : BaseSkillInstanceData, IDisposable { public CharacterBody currentlyTrackingOrTamedTarget; public float trackerUpdateFrequency; public float maxTrackingDistance; public float maxTrackingAngle; private readonly BullseyeSearch search = new BullseyeSearch(); internal Indicator indicator; private float trackerUpdateStopwatch; public InstanceData() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0024: Unknown result type (might be due to invalid IL or missing references) search.filterByLoS = true; search.sortMode = (SortMode)1; } public void SetNewTrackingTarget(CharacterBody characterBody) { currentlyTrackingOrTamedTarget = characterBody; } public void SetNewTrackingTarget(HurtBox hurtbox) { if (Object.op_Implicit((Object)(object)hurtbox) && Object.op_Implicit((Object)(object)hurtbox.healthComponent) && Object.op_Implicit((Object)(object)hurtbox.healthComponent.body)) { currentlyTrackingOrTamedTarget = hurtbox.healthComponent.body; } } public void DoFixedUpdate(GenericSkill runningGS) { trackerUpdateStopwatch += Time.fixedDeltaTime; if (trackerUpdateStopwatch >= 1f / trackerUpdateFrequency) { trackerUpdateStopwatch -= 1f / trackerUpdateFrequency; _ = currentlyTrackingOrTamedTarget; SearchForTarget(runningGS); indicator.targetTransform = (Object.op_Implicit((Object)(object)currentlyTrackingOrTamedTarget) ? currentlyTrackingOrTamedTarget.transform : null); } } public virtual void SearchForTarget(GenericSkill skillSlot) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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) if (!Object.op_Implicit((Object)(object)currentlyTrackingOrTamedTarget) || TeamManager.IsTeamEnemy(skillSlot.characterBody.teamComponent.teamIndex, currentlyTrackingOrTamedTarget.teamComponent.teamIndex)) { search.teamMaskFilter = TeamMask.GetEnemyTeams(skillSlot.characterBody.teamComponent.teamIndex); search.searchOrigin = skillSlot.characterBody.inputBank.aimOrigin; search.searchDirection = skillSlot.characterBody.inputBank.aimDirection; search.maxDistanceFilter = maxTrackingDistance; search.maxAngleFilter = maxTrackingAngle; search.RefreshCandidates(); search.FilterOutGameObject(((Component)skillSlot).gameObject); SetNewTrackingTarget(((InstanceData)(object)skillSlot.skillInstanceData).search.GetResults().FirstOrDefault()); } } public void Dispose() { currentlyTrackingOrTamedTarget = null; indicator.DestroyVisualizer(); indicator = null; } } [Header("Beastmaster Parameters")] [Header("Beastmaster To-Tame Parameters")] [Tooltip("Entity state to use whenever the target is NOT a friend.")] public SerializableEntityStateType tameStateType; [Tooltip("This is the indicator prefab that the skill defaults to.")] public GameObject tameIndicatorPrefab; public Sprite tameSkillIcon; public string tameSkillNameToken; public string tameSkillDescToken; public float tameMaxTrackingDistance; public float tameMaxTrackingAngle; [Header("Beastmaster Friend Parameters")] [Tooltip("Entity state to use whenever the target is a friend.")] public SerializableEntityStateType friendStateType; public GameObject friendIndicatorPrefab; public Sprite friendSkillIcon; public string friendSkillNameToken; public string friendSkillDescToken; [Tooltip("Max distance for a friend to be considered available for friendStateType, set zero or less to disable.")] public float friendMaxAvailableDistance; public override BaseSkillInstanceData OnAssigned([NotNull] GenericSkill skillSlot) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown return (BaseSkillInstanceData)(object)new InstanceData { indicator = new Indicator(((Component)skillSlot.characterBody).gameObject, tameIndicatorPrefab), maxTrackingAngle = tameMaxTrackingAngle, maxTrackingDistance = tameMaxTrackingDistance }; } public override void OnUnassigned(GenericSkill skillSlot) { if ((InstanceData)(object)skillSlot.skillInstanceData != null) { ((InstanceData)(object)skillSlot.skillInstanceData).Dispose(); } ((SkillDef)this).OnUnassigned(skillSlot); } public override Sprite GetCurrentIcon(GenericSkill skillSlot) { if ((InstanceData)(object)skillSlot.skillInstanceData != null && (Object)(object)((InstanceData)(object)skillSlot.skillInstanceData).currentlyTrackingOrTamedTarget != (Object)null) { if (!IsTargetFriend(skillSlot)) { return tameSkillIcon; } return friendSkillIcon; } return ((SkillDef)this).GetCurrentIcon(skillSlot); } public override string GetCurrentNameToken(GenericSkill skillSlot) { if ((InstanceData)(object)skillSlot.skillInstanceData != null && (Object)(object)((InstanceData)(object)skillSlot.skillInstanceData).currentlyTrackingOrTamedTarget != (Object)null) { if (!IsTargetFriend(skillSlot)) { return tameSkillNameToken; } return friendSkillNameToken; } return ((SkillDef)this).GetCurrentNameToken(skillSlot); } public override string GetCurrentDescriptionToken(GenericSkill skillSlot) { if ((InstanceData)(object)skillSlot.skillInstanceData != null && (Object)(object)((InstanceData)(object)skillSlot.skillInstanceData).currentlyTrackingOrTamedTarget != (Object)null) { if (!IsTargetFriend(skillSlot)) { return tameSkillDescToken; } return friendSkillDescToken; } return ((SkillDef)this).GetCurrentDescriptionToken(skillSlot); } public virtual bool IsTargetFriend(GenericSkill skillSlot) { //IL_002e: 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) if ((Object)(object)((InstanceData)(object)skillSlot.skillInstanceData).currentlyTrackingOrTamedTarget == (Object)null) { throw new ArgumentNullException("BeastmasterSkillDef::IsTargetFriend()::((BeastmasterSkillDef.InstanceData)skillSlot.skillInstanceData).currentlyTrackingOrTamedTarget is null."); } return !TeamManager.IsTeamEnemy(skillSlot.characterBody.teamComponent.teamIndex, ((InstanceData)(object)skillSlot.skillInstanceData).currentlyTrackingOrTamedTarget.teamComponent.teamIndex); } public virtual bool HasAvailableTargets([NotNull] GenericSkill skillSlot) { //IL_003d: 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) if ((Object)(object)((InstanceData)(object)skillSlot.skillInstanceData).currentlyTrackingOrTamedTarget != (Object)null) { if (IsTargetFriend(skillSlot)) { if (IsTargetFriend(skillSlot)) { if (!(friendMaxAvailableDistance <= 0f)) { return Vector3.Distance(skillSlot.characterBody.corePosition, ((InstanceData)(object)skillSlot.skillInstanceData).currentlyTrackingOrTamedTarget.corePosition) <= friendMaxAvailableDistance; } return true; } return false; } return true; } return false; } public override bool CanExecute([NotNull] GenericSkill skillSlot) { if (HasAvailableTargets(skillSlot)) { return ((SkillDef)this).CanExecute(skillSlot); } return false; } public override bool IsReady([NotNull] GenericSkill skillSlot) { if (((SkillDef)this).IsReady(skillSlot)) { return HasAvailableTargets(skillSlot); } return false; } public override EntityState InstantiateNextState(GenericSkill skillSlot) { //IL_0047: 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_002f: Unknown result type (might be due to invalid IL or missing references) if ((InstanceData)(object)skillSlot.skillInstanceData != null && (Object)(object)((InstanceData)(object)skillSlot.skillInstanceData).currentlyTrackingOrTamedTarget != (Object)null) { if (!IsTargetFriend(skillSlot)) { return EntityStateCatalog.InstantiateState(tameStateType); } return EntityStateCatalog.InstantiateState(friendStateType); } return EntityStateCatalog.InstantiateState(base.activationState); } public override void OnFixedUpdate([NotNull] GenericSkill skillSlot) { ((SkillDef)this).OnFixedUpdate(skillSlot); if ((InstanceData)(object)skillSlot.skillInstanceData != null) { ((InstanceData)(object)skillSlot.skillInstanceData).DoFixedUpdate(skillSlot); } } } [CreateAssetMenu(menuName = "Starstorm2/SkillDef/OverstressedSkillDef")] public class OverstressedSkillDef : SkillDef { protected class InstanceData : BaseSkillInstanceData { public NemCaptainController ncc; } [Tooltip("If the skill can be casted while overstressed.")] public bool canCastIfOverstressed; public override BaseSkillInstanceData OnAssigned([NotNull] GenericSkill skillSlot) { return (BaseSkillInstanceData)(object)new InstanceData { ncc = ((Component)skillSlot).GetComponent() }; } private static bool IsOverstressed([NotNull] GenericSkill skillSlot) { return ((InstanceData)(object)skillSlot.skillInstanceData).ncc.isOverstressed; } public override bool CanExecute([NotNull] GenericSkill skillSlot) { if (!IsOverstressed(skillSlot) || canCastIfOverstressed) { return ((SkillDef)this).CanExecute(skillSlot); } return false; } public override bool IsReady([NotNull] GenericSkill skillSlot) { if (((SkillDef)this).IsReady(skillSlot)) { if (IsOverstressed(skillSlot)) { return canCastIfOverstressed; } return true; } return false; } } [CreateAssetMenu(menuName = "Starstorm2/SkillDef/SS2ReloadSkillDef")] public class SS2ReloadSkillDef : ReloadSkillDef { public override void OnFixedUpdate([NotNull] GenericSkill skillSlot) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown //IL_0056: 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) ((ReloadSkillDef)this).OnFixedUpdate(skillSlot); InstanceData val = (InstanceData)skillSlot.skillInstanceData; val.currentStock = skillSlot.stock; if (val.currentStock >= ((SkillDef)this).GetMaxStock(skillSlot) + skillSlot.bonusStockFromBody) { return; } if (Object.op_Implicit((Object)(object)skillSlot.stateMachine) && !skillSlot.stateMachine.HasPendingState() && skillSlot.stateMachine.CanInterruptState(base.reloadInterruptPriority)) { val.graceStopwatch += Time.fixedDeltaTime; if (val.graceStopwatch >= base.graceDuration || val.currentStock == 0) { skillSlot.stateMachine.SetNextState(EntityStateCatalog.InstantiateState(base.reloadState)); } } else { val.graceStopwatch = 0f; } } } [CreateAssetMenu(menuName = "Starstorm2/SkillDef/StressSkillDef")] public class StressSkillDef : SkillDef { protected class InstanceData : BaseSkillInstanceData { public NemCaptainController ncc; } [Tooltip("The amount of stress added by this skill.")] public float stressValue; [Tooltip("If the skill can be casted while overstressed.")] public bool canCastIfOverstressed; [Tooltip("If the skill can be casted when there is insufficient stress.")] public bool canCastIfWillOverstress; public override BaseSkillInstanceData OnAssigned([NotNull] GenericSkill skillSlot) { return (BaseSkillInstanceData)(object)new InstanceData { ncc = ((Component)skillSlot).GetComponent() }; } private static bool IsOverstressed([NotNull] GenericSkill skillSlot) { return ((InstanceData)(object)skillSlot.skillInstanceData).ncc.isOverstressed; } public override bool CanExecute([NotNull] GenericSkill skillSlot) { NemCaptainController ncc = ((InstanceData)(object)skillSlot.skillInstanceData).ncc; if ((!IsOverstressed(skillSlot) || canCastIfOverstressed) && (100f - ncc.stress > stressValue || canCastIfWillOverstress)) { return ((SkillDef)this).CanExecute(skillSlot); } return false; } public override bool IsReady([NotNull] GenericSkill skillSlot) { NemCaptainController ncc = ((InstanceData)(object)skillSlot.skillInstanceData).ncc; if (((SkillDef)this).IsReady(skillSlot) && (!IsOverstressed(skillSlot) || canCastIfOverstressed)) { if (!(100f - ncc.stress > stressValue)) { return canCastIfWillOverstress; } return true; } return false; } public override void OnExecute([NotNull] GenericSkill skillSlot) { ((SkillDef)this).OnExecute(skillSlot); ((InstanceData)(object)skillSlot.skillInstanceData).ncc.AddStress(stressValue); } } } 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 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!"); } } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)5; } } } 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("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(); } 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); } } 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("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(); } 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.Trader.Bag { public class BagBaseState : BaseState { protected PickupPickerController pickupPickerController; protected TraderController traderController; protected virtual bool enableInteraction => true; public override void OnEnter() { ((BaseState)this).OnEnter(); pickupPickerController = ((EntityState)this).GetComponent(); traderController = ((EntityState)this).GetComponent(); pickupPickerController.SetAvailable(enableInteraction); } } public class Idle : BagBaseState { protected override bool enableInteraction { get { Debug.Log((object)"returning true"); return true; } } } public class TradeToIdle : BagBaseState { public static string enterSoundString; public static string exitSoundString; public static float duration; public static float dropUpVelocityStrength; public static float dropForwardVelocityStrength; public static GameObject muzzleFlashEffectPrefab; public static string muzzleString; public static float lowTrade = -0.1f; public static float highTrade = 0.4f; public static float rareThreshold = 0.72f; public static float uncommonThreshold = 0.32f; public static float commonThreshold = 0.01f; private bool foundValidItem; protected override bool enableInteraction => false; public override void OnEnter() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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_007a: Invalid comparison between Unknown and I4 //IL_00d8: 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_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: 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_0142: 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_0171: 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_017c: 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_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_0224: 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_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); if (!NetworkServer.active) { return; } foundValidItem = false; PickupIndex val = PickupIndex.none; ItemDef itemDef = ItemCatalog.GetItemDef(traderController.lastTradedItemIndex); if (!((Object)(object)itemDef != (Object)null)) { return; } float num = traderController.GetValue(itemDef); Debug.Log((object)("initial player item value: " + num)); if ((int)itemDef.tier == 0 || (int)itemDef.tier == 6) { num -= 0.05f; } num += Util.Remap(Random.value, 0f, 1f, lowTrade, highTrade); Debug.Log((object)("slightly randomized: " + num)); if (num >= rareThreshold) { ItemIndex[] array = ItemCatalog.tier3ItemList.ToArray(); val = PickupCatalog.FindPickupIndex(array[Random.Range(0, array.Length)]); } else if (num >= uncommonThreshold) { ItemIndex[] array2 = ItemCatalog.tier2ItemList.ToArray(); val = PickupCatalog.FindPickupIndex(array2[Random.Range(0, array2.Length)]); } else if (num >= commonThreshold) { ItemIndex[] array3 = ItemCatalog.tier1ItemList.ToArray(); val = PickupCatalog.FindPickupIndex(array3[Random.Range(0, array3.Length)]); } if (num < commonThreshold) { val = PickupCatalog.FindPickupIndex(Items.ScrapWhite.itemIndex); } else { if (val == PickupCatalog.FindPickupIndex(Items.ScrapWhite.itemIndex)) { val = PickupCatalog.FindPickupIndex(Items.Syringe.itemIndex); } if (val == PickupCatalog.FindPickupIndex(Items.ScrapGreen.itemIndex)) { val = PickupCatalog.FindPickupIndex(Items.Feather.itemIndex); } if (val == PickupCatalog.FindPickupIndex(Items.ScrapRed.itemIndex)) { val = PickupCatalog.FindPickupIndex(Items.ExtraLife.itemIndex); } } if (!Run.instance.IsItemAvailable(((PickupIndex)(ref val)).itemIndex)) { val = PickupCatalog.FindPickupIndex((ItemIndex)(((PickupIndex)(ref val)).itemIndex + 1)); } if (itemDef.itemIndex == SS2Content.Items.VoidRock.itemIndex) { val = PickupCatalog.FindPickupIndex(SS2Content.Items.GildedAmulet.itemIndex); } traderController.ReduceValue(); Debug.Log((object)("zan giving: " + ((PickupIndex)(ref val)).GetPickupNameToken())); if (val != PickupIndex.none) { foundValidItem = true; Transform val2 = ((BaseState)this).FindModelChild(muzzleString); PickupDropletController.CreatePickupDroplet(val, val2.position, Vector3.up * dropUpVelocityStrength + val2.forward * dropForwardVelocityStrength); } } public override void OnExit() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound(exitSoundString, ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.SetBuffCount(SS2Content.Buffs.bdHiddenSlow20.buffIndex, 0); } ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (foundValidItem && ((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Idle()); } } } public class Trading : BagBaseState { public static float duration; public static string enterSoundString; public static string exitSoundString; protected override bool enableInteraction => false; public override void OnEnter() { base.OnEnter(); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); } public override void OnExit() { Util.PlaySound(exitSoundString, ((EntityState)this).gameObject); ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new TradeToIdle()); } } } public class WaitToBeginTrade : BagBaseState { public static float duration; protected override bool enableInteraction => false; public override void OnEnter() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.SetBuffCount(SS2Content.Buffs.bdHiddenSlow20.buffIndex, 10); } ((EntityState)this).PlayCrossfade("Body", "Scavenge", "Scavenge.playbackRate", duration + Trading.duration + TradeToIdle.duration, 0.05f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Trading()); } } } } namespace EntityStates.Seraph { public class SeraphPrimary : BaseSkillState { [TokenModifier(/*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("prefabs/effects/muzzleflashes/Muzzleflash1"); [HideInInspector] public static GameObject tracerPrefab = LegacyResourcesAPI.Load("prefabs/effects/tracers/tracercommandodefault"); [HideInInspector] public static GameObject hitPrefab = LegacyResourcesAPI.Load("prefabs/effects/HitsparkCommando"); private float duration; private float fireDuration; private string muzzleString; private bool hasFired; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireDuration = 0.1f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); muzzleString = "Muzzle"; hasFired = false; ((EntityState)this).PlayCrossfade("Gesture, Override", "Primary", "Primary.playbackRate", duration * 2.5f, 0.05f); Shoot(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!(((EntityState)this).fixedAge < duration) && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Shoot() { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d7: 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_00ea: 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_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0101: 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_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; bool isCrit = ((BaseState)this).RollCrit(); ((BaseState)this).AddRecoil(-0.4f * recoil, -0.8f * recoil, -0.3f * recoil, 0.3f * recoil); if (Object.op_Implicit((Object)(object)muzzleEffectPrefab)) { EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); } if (((EntityState)this).isAuthority) { _ = damageCoefficient; _ = ((BaseState)this).damageStat; Ray aimRay = ((BaseState)this).GetAimRay(); new BulletAttack { aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageType = (DamageType)0, damageColorIndex = (DamageColorIndex)0, minSpread = 0f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle, falloffModel = (FalloffModel)0, force = force, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 0.35f, weapon = ((EntityState)this).gameObject, tracerEffectPrefab = tracerPrefab, hitEffectPrefab = hitPrefab }.Fire(); } ((EntityState)this).characterBody.AddSpreadBloom(spreadBloom); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } } namespace EntityStates.Runshroom { public class PlaceSpores : BaseSkillState { private GameObject projectilePrefab; private bool hasFired; private bool hasWaited; public static float baseDuration; public static float damageCoefficient = 1f; public static float projectileVelocity = 40f; public static GameObject chargeEffectPrefab; private float duration; private Animator animator; private ChildLocator childLocator; private float originalMoveSpeed; public override void OnEnter() { ((BaseState)this).OnEnter(); projectilePrefab = SporeGrenade.projectilePrefab; originalMoveSpeed = ((EntityState)this).characterBody.moveSpeed; ((EntityState)this).characterBody.moveSpeed = 0f; ((EntityState)this).PlayCrossfade("Body", "ToIdle", 0.05f); duration = baseDuration / ((BaseState)this).attackSpeedStat; childLocator = ((EntityState)this).GetModelChildLocator(); hasFired = false; hasWaited = false; animator = ((EntityState)this).GetModelAnimator(); } public override void FixedUpdate() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.moveSpeed = 0f; if (((EntityState)this).fixedAge >= duration * 0.2f && !hasWaited) { hasWaited = true; GameObject obj = Object.Instantiate(chargeEffectPrefab); obj.transform.SetParent(childLocator.FindChild("TippyTop")); obj.transform.position = childLocator.FindChild("TippyTop").position; ((EntityState)this).PlayCrossfade("Body", "Attack", "Primary.playbackRate", duration, 0.1f); } if (animator.GetFloat("Attack") > 0.5f && !hasFired) { hasFired = true; if (((EntityState)this).isAuthority) { FireProjectile(); } } if (((EntityState)this).fixedAge >= duration * 1.2f && hasFired) { ((EntityState)this).outer.SetNextStateToMain(); } } public void FireProjectile() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) float num = damageCoefficient * ((BaseState)this).damageStat; Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(Vector3.down), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileVelocity); } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).characterBody.moveSpeed = originalMoveSpeed; } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class RushroomDeath : GenericCharacterDeath { public override void OnEnter() { ((GenericCharacterDeath)this).OnEnter(); VFXListComponent component = ((Component)((EntityState)this).characterBody).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.TurnOffVFX(); } } public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); } public override void OnExit() { ((GenericCharacterDeath)this).OnExit(); } } } namespace EntityStates.RemunerationOption { public class Opening : EntityState { public static float duration = 1f; public static int maxItemDropCount = 5; private ChestBehavior chestBehavior; private float itemDropCount; private float timeBetweenDrops; private float itemDropAge; public override void OnEnter() { ((EntityState)this).OnEnter(); ((EntityState)this).PlayAnimation("Body", "Opening"); timeBetweenDrops = duration / (float)maxItemDropCount; chestBehavior = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)((EntityState)this).sfxLocator)) { Util.PlaySound(((EntityState)this).sfxLocator.openSound, ((EntityState)this).gameObject); } } public override void FixedUpdate() { //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown //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) ((EntityState)this).FixedUpdate(); if (NetworkServer.active) { itemDropAge += Time.fixedDeltaTime; if (itemDropCount < (float)maxItemDropCount && itemDropAge > timeBetweenDrops) { itemDropCount += 1f; itemDropAge -= timeBetweenDrops; chestBehavior.dropPickup = PickupCatalog.FindPickupIndex(MiscPickups.LunarCoin.miscPickupIndex); chestBehavior.ItemDrop(); } if (((EntityState)this).fixedAge >= duration) { base.outer.SetNextState((EntityState)new Opened()); } } } } } namespace EntityStates.Pickups.Remuneration { public class OfferCoin : BaseState { public static float duration = 1.93f; public override void OnEnter() { ((BaseState)this).OnEnter(); Transform obj = ((EntityState)this).transform.Find("RemunerationPortal"); ((Component)obj).gameObject.SetActive(true); ((Component)obj).GetComponent().newDuration = duration; ((Component)obj.Find("Portal/Sphere")).GetComponent().timeMax = duration; Util.PlaySound("RemunerationSpawn2", ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Reward()); } } } public class Reward : BaseState { public static float dropletSpreadAngle = 30f; public static float dropletUpVelocity = 20f; public static float dropletForwardVelocity = 8f; private int itemsDropped; private int numItems = 3; private RemunerationShopBehavior shop; private Transform portalTransform; public static GameObject explosionPrefab = SS2Assets.LoadAsset("RemunerationExplosion", SS2Bundle.Items); public static float effectScale = 1f; public override void OnEnter() { //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_0062: 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) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown ((BaseState)this).OnEnter(); shop = ((EntityState)this).GetComponent(); if (NetworkServer.active) { ChildLocator component = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { portalTransform = component.FindChild("Portal"); EffectData val = new EffectData { origin = (Object.op_Implicit((Object)(object)portalTransform) ? portalTransform.position : ((EntityState)this).transform.position), rotation = Quaternion.identity, scale = effectScale }; EffectManager.SpawnEffect(explosionPrefab, val, true); } while (itemsDropped < numItems) { DropItem(); itemsDropped++; } } } private void DropItem() { //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) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: 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_00ab: Unknown result type (might be due to invalid IL or missing references) float num = (0f - dropletSpreadAngle / 2f) * (float)(numItems - 1) + (float)itemsDropped * dropletSpreadAngle; Vector3 val = Quaternion.Euler(0f, num, 0f) * (Object.op_Implicit((Object)(object)portalTransform) ? portalTransform.forward : ((EntityState)this).transform.forward); Vector3 velocity = Vector3.up * dropletUpVelocity + val * dropletForwardVelocity; shop.SpawnDroplet(Object.op_Implicit((Object)(object)portalTransform) ? portalTransform.position : ((EntityState)this).transform.position, velocity); } } public class Wait : BaseState { public static float duration = 1.75f; public override void OnEnter() { ((BaseState)this).OnEnter(); ((Component)((EntityState)this).transform.Find("RemunerationPortal")).gameObject.SetActive(false); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new OfferCoin()); } } } } namespace EntityStates.Pickups.Extinction { public class ExtinctionBaseState : EntityState { private GenericOwnership genericOwnership; private SimpleLeash simpleLeash; private RadialForce radial; private MemoizedGetComponent bodyGetComponent; private protected ExtinctionController extinctionController { get; set; } protected CharacterBody ownerBody { get { GenericOwnership val = genericOwnership; return bodyGetComponent.Get(((Object)(object)val != (Object)null) ? val.ownerObject : null); } } protected virtual bool shouldFollow => true; public override void OnEnter() { ((EntityState)this).OnEnter(); genericOwnership = ((EntityState)this).GetComponent(); simpleLeash = ((EntityState)this).GetComponent(); extinctionController = ((EntityState)this).GetComponent(); radial = ((EntityState)this).GetComponent(); } public override void Update() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).Update(); if (Object.op_Implicit((Object)(object)ownerBody) && shouldFollow) { simpleLeash.leashOrigin = ownerBody.corePosition; } } protected float GetScale() { float num = 1f; if (Object.op_Implicit((Object)(object)ownerBody) && Object.op_Implicit((Object)(object)ownerBody.inventory)) { num *= (float)ownerBody.inventory.GetItemCount(SS2Content.Items.RelicOfExtinction); } return num; } } internal class ExtinctionDieStage : ExtinctionBaseState { public static float baseDuration = 10f; public FixedTimeStamp readyTime { get; private set; } protected override bool shouldFollow => false; public override void OnEnter() { //IL_000f: 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) base.OnEnter(); if (((EntityState)this).isAuthority) { readyTime = FixedTimeStamp.now + baseDuration; } } public override void FixedUpdate() { //IL_0046: 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) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0078: 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_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: 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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: 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_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)base.ownerBody)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ExtinctionIdleState()); } if (((EntityState)this).isAuthority && !Object.op_Implicit((Object)(object)base.ownerBody) && FixedTimeStamp.now >= readyTime) { BlastAttack val = new BlastAttack { attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject }; val.teamIndex = TeamComponent.GetObjectTeam(val.attacker); val.position = ((EntityState)this).characterBody.corePosition; val.procCoefficient = 1f; val.radius = GetScale() * 2f; val.baseForce = GetScale(); val.bonusForce = Vector3.up * 20f; val.baseDamage = base.ownerBody.baseDamage * 5f; val.falloffModel = (FalloffModel)1; val.damageColorIndex = (DamageColorIndex)3; val.attackerFiltering = (AttackerFiltering)0; val.Fire(); Object.Destroy((Object)(object)((EntityState)this).gameObject); } } public override void OnSerialize(NetworkWriter writer) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnSerialize(writer); NetworkExtensions.Write(writer, readyTime); } public override void OnDeserialize(NetworkReader reader) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnDeserialize(reader); readyTime = NetworkExtensions.ReadFixedTimeStamp(reader); } } internal class ExtinctionEnterState : ExtinctionBaseState { public static float baseDuration = 10f; public FixedTimeStamp readyTime { get; private set; } public override void OnEnter() { //IL_000f: 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) base.OnEnter(); if (((EntityState)this).isAuthority) { readyTime = FixedTimeStamp.now + baseDuration; } base.extinctionController.showExtinctionDisplay = false; } public override void FixedUpdate() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && (Object.op_Implicit((Object)(object)base.ownerBody) || base.ownerBody.inventory.GetItemCount(SS2Content.Items.RelicOfExtinction) < 1) && FixedTimeStamp.now >= readyTime) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ExtinctionIdleState()); } } public override void OnExit() { ((EntityState)this).OnExit(); base.extinctionController.showExtinctionDisplay = true; } public override void OnSerialize(NetworkWriter writer) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnSerialize(writer); NetworkExtensions.Write(writer, readyTime); } public override void OnDeserialize(NetworkReader reader) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnDeserialize(reader); readyTime = NetworkExtensions.ReadFixedTimeStamp(reader); } } internal class ExtinctionIdleState : ExtinctionBaseState { private OverlapAttack attack; private float fireStopwatch; private float resetStopwatch; [Tooltip("The frequency (1/time) at which the overlap attack is tested. Higher values are more accurate but more expensive.")] public float fireFrequency = 1f; [Tooltip("The frequency (1/time) at which the overlap attack is reset. Higher values means more frequent ticks of damage.")] public float resetFrequency = 4f; [Tooltip("Should the attacks also damage the owner.")] public AttackerFiltering attackerFiltering = (AttackerFiltering)1; public override void OnEnter() { base.OnEnter(); ResetOverlap(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { resetStopwatch += Time.fixedDeltaTime; fireStopwatch += Time.fixedDeltaTime; if (resetStopwatch >= 1f / resetFrequency) { ResetOverlap(); resetStopwatch -= 1f / resetFrequency; } if (fireStopwatch >= 1f / fireFrequency) { attack.Fire((List)null); fireStopwatch -= 1f / fireFrequency; } } if (((EntityState)this).isAuthority && (!Object.op_Implicit((Object)(object)base.ownerBody) || base.ownerBody.inventory.GetItemCount(SS2Content.Items.RelicOfExtinction) < 1)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ExtinctionDieStage()); } } private void ResetOverlap() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) attack = new OverlapAttack(); attack.procCoefficient = 0f; attack.attacker = ((Component)base.ownerBody).gameObject; attack.inflictor = ((EntityState)this).gameObject; attack.teamIndex = base.ownerBody.teamComponent.teamIndex; attack.attackerFiltering = attackerFiltering; attack.damage = base.ownerBody.baseDamage * 2.5f; attack.isCrit = false; attack.damageColorIndex = (DamageColorIndex)7; attack.damageType = (DamageType)131072; attack.hitBoxGroup = ((EntityState)this).GetComponent(); } } } namespace EntityStates.Pickups.Augury { public abstract class AuguryBaseState : BaseBodyAttachmentState { protected AuguryEffectController auguryEffect; protected Moonstorm.Starstorm2.Items.Augury.Behavior auguryBehavior; public override void OnEnter() { ((BaseBodyAttachmentState)this).OnEnter(); ChildLocator component = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Transform obj = component.FindChild("Center"); auguryEffect = ((obj != null) ? ((Component)obj).GetComponent() : null); auguryBehavior = ((Component)((BaseBodyAttachmentState)this).attachedBody).GetComponent(); } } } public class AuguryDetonation : AuguryBaseState { public static string detonationSound = ""; public static float duration = 5f; public static float divisorValueForBosses = 2f; public TeamIndex attackerTeam; private CharacterBody body; public override void OnEnter() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); body = ((BaseBodyAttachmentState)this).attachedBody; if (NetworkServer.active && Object.op_Implicit((Object)(object)((BaseBodyAttachmentState)this).attachedBody)) { foreach (TeamComponent teamMember in TeamComponent.GetTeamMembers(attackerTeam)) { CharacterBody val = teamMember.body; if (Object.op_Implicit((Object)(object)val)) { if (val.isBoss || val.isChampion) { DamageForHalfOfMaxHealth(val); continue; } GameObject val2 = (Object.op_Implicit((Object)(object)((BaseBodyAttachmentState)this).attachedBody) ? ((Component)((BaseBodyAttachmentState)this).attachedBody).gameObject : null); val.healthComponent.Suicide(val2, val2, (DamageType)65536); Util.PlaySound(val.sfxLocator.deathSound, ((EntityState)this).gameObject); } } } auguryEffect.fadeOut = true; } private void DamageForHalfOfMaxHealth(CharacterBody bossBody) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown DamageInfo val = new DamageInfo { attacker = (Object.op_Implicit((Object)(object)body) ? ((Component)body).gameObject : null), inflictor = (Object.op_Implicit((Object)(object)body) ? ((Component)body).gameObject : null), crit = body.RollCrit(), damage = bossBody.maxHealth / 2f, damageColorIndex = (DamageColorIndex)7, damageType = (DamageType)0, dotIndex = (DotIndex)(-1), procCoefficient = 1f }; bossBody.healthComponent.TakeDamage(val); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((Behaviour)auguryEffect.explosionScaleCurve).enabled = false; ((EntityState)this).outer.SetNextState((EntityState)(object)new AuguryRecharge()); } } } public class AuguryIdle : AuguryBaseState { public static float damageThresholdMultiplier = 6f; private float damageThreshold; private float tankedDamage; private TeamIndex lastestAttackerTeamIndex; private Vector3 effectScale; public void OnTakeDamage(DamageReport damageReport) { //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) if (!damageReport.isFallDamage) { tankedDamage += damageReport.damageDealt; lastestAttackerTeamIndex = damageReport.attackerTeamIndex; } } public override void Update() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002c: 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_004d: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).Update(); effectScale = Vector3.one * tankedDamage / ((BaseBodyAttachmentState)this).attachedBody.maxHealth / 2f * ((BaseBodyAttachmentState)this).attachedBody.bestFitRadius; auguryEffect.UpdateSize(effectScale); } public override void FixedUpdate() { //IL_0045: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); damageThreshold = ((BaseBodyAttachmentState)this).attachedBody.maxHealth * damageThresholdMultiplier; if (tankedDamage > damageThreshold && NetworkServer.active) { tankedDamage = 0f; AuguryPrepDetonation auguryPrepDetonation = new AuguryPrepDetonation(); auguryPrepDetonation.scale = effectScale; auguryPrepDetonation.detonatorTeamIndex = lastestAttackerTeamIndex; ((EntityState)this).outer.SetNextState((EntityState)(object)auguryPrepDetonation); } } public override void OnSerialize(NetworkWriter writer) { ((EntityState)this).OnSerialize(writer); writer.Write(tankedDamage); } public override void OnDeserialize(NetworkReader reader) { ((EntityState)this).OnDeserialize(reader); tankedDamage = reader.ReadSingle(); } } public class AuguryPrepDetonation : AuguryBaseState { public static float baseDuration = 10f; public static float minDuration = 3f; public static string chargeSound = ""; public Vector3 scale; public TeamIndex detonatorTeamIndex; private float duration; public override void OnEnter() { //IL_0060: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); float num = baseDuration / (Object.op_Implicit((Object)(object)((BaseBodyAttachmentState)this).attachedBody) ? ((BaseBodyAttachmentState)this).attachedBody.attackSpeed : 1f); duration = Mathf.Clamp(num, minDuration, baseDuration * 2f); Util.PlaySound(chargeSound, ((EntityState)this).gameObject); auguryEffect.BeginScale(scale, duration); } public override void FixedUpdate() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { AuguryDetonation auguryDetonation = new AuguryDetonation(); auguryDetonation.attackerTeam = detonatorTeamIndex; ((EntityState)this).outer.SetNextState((EntityState)(object)auguryDetonation); } } } public class AuguryRecharge : AuguryBaseState { public static float BaseDuration = 60f; public static float MaxDuration = 90f; public static float MinDuration = 30f; private float rechargeDuration; public override void OnEnter() { base.OnEnter(); rechargeDuration = Mathf.Clamp(MinDuration, MaxDuration, Object.op_Implicit((Object)(object)((BaseBodyAttachmentState)this).attachedBody) ? (BaseDuration / ((BaseBodyAttachmentState)this).attachedBody.attackSpeed) : BaseDuration); auguryEffect.RestoreDefaults(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge > rechargeDuration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new AuguryIdle()); } } } } namespace EntityStates.Nucleator { internal class ApplyRadionuclideSurge : BaseSkillState { private float stateDuration = 6f; private float buffDuration = 6f; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(SS2Content.Buffs.BuffNucleatorSpecial, buffDuration); } animator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)animator)) { animator.SetLayerWeight(animator.GetLayerIndex("Body, Additive"), 1f); } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)animator)) { animator.SetLayerWeight(animator.GetLayerIndex("Body, Additive"), 0f); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= stateDuration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } [RequireComponent(typeof(ProjectileController))] [RequireComponent(typeof(ProjectileDamage))] public class NucleatorProjectile : MonoBehaviour { private ProjectileController projectileController; private ProjectileImpactExplosion projectileImpactExplosion; private ProjectileDamage projectileDamage; private float duration; private float fixedAge; private Rigidbody rigidbody; private float frequency = 14f; private float magnitude = 0.25f; private Vector3 axis; private Vector3 pos; public TeamIndex teamIndex; public float baseDuration = 2f; public float acceleration = 50f; public GameObject rotateObject; public float removalTime = 1f; public float baseRadius; public float baseDamage; public float charge; private void Awake() { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: 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_00ba: Unknown result type (might be due to invalid IL or missing references) projectileController = ((Component)this).GetComponent(); projectileDamage = ((Component)this).GetComponent(); projectileImpactExplosion = ((Component)this).GetComponent(); rigidbody = ((Component)this).GetComponent(); rigidbody.useGravity = false; duration = baseDuration; fixedAge = 0f; baseDamage = projectileDamage.damage; projectileImpactExplosion.lifetime = baseDuration; acceleration = (1f - charge) * 30f + 20f; pos = ((Component)this).transform.position; axis = ((Component)this).transform.up * -1f; } private void FixedUpdate() { //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_00dd: 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_00ed: Unknown result type (might be due to invalid IL or missing references) fixedAge += Time.deltaTime; float num = fixedAge / baseDuration; if (fixedAge < baseDuration) { ((ProjectileExplosion)projectileImpactExplosion).blastRadius = baseRadius + num * (baseRadius * 1.25f - 1f) + 1f; projectileDamage.damage = baseDamage + num * (baseDamage * 1.25f - 1f) + 1f; pos += ((Component)this).transform.forward * Time.deltaTime * acceleration; ((Component)this).transform.position = pos + axis * Mathf.Sin(Time.time * frequency) * magnitude; } } } } namespace EntityStates.Nemmando { public class Appear : BaseState { private static GameObject spawnEffectPrefab = SpawnState.spawnEffectPrefab; public static float duration = 2.5f; public static float delayBeforeAimAnimatorWeight; private Animator modelAnimator; private CharacterModel characterModel; public override void OnEnter() { ((BaseState)this).OnEnter(); characterModel = null; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody.modelLocator) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.modelLocator.modelTransform)) { characterModel = ((Component)((EntityState)this).characterBody.modelLocator.modelTransform).GetComponent(); } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; obj.invisibilityCount--; } modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.SetFloat(AnimationParameters.aimWeight, 0f); } ((EntityState)this).PlayAnimation("FullBody, Override", "Spawn", "Spawn.playbackRate", duration); if (Object.op_Implicit((Object)(object)spawnEffectPrefab)) { Util.PlaySound(SpawnState.spawnSoundString, ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(spawnEffectPrefab, ((EntityState)this).gameObject, "PortalSpawn", false); } if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, duration * 1.2f); } } public override void Update() { ((EntityState)this).Update(); if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.SetFloat(AnimationParameters.aimWeight, Mathf.Clamp01((((EntityState)this).age - delayBeforeAimAnimatorWeight) / duration)); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.SetFloat(AnimationParameters.aimWeight, 1f); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)6; } } public class BarrageCharge : BaseSkillState { public static float baseChargeDuration; public static GameObject chargeEffect; private float chargeDuration; private ChildLocator childLocator; private Animator animator; private Transform modelBaseTransform; private uint chargePlayID; private bool hasFinishedCharging; private GameObject chargeEffectInstance; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); chargeDuration = baseChargeDuration; childLocator = ((EntityState)this).GetModelChildLocator(); modelBaseTransform = ((EntityState)this).GetModelBaseTransform(); animator = ((EntityState)this).GetModelAnimator(); hasFinishedCharging = false; chargePlayID = Util.PlaySound("NemmandoSubmissionCharge", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)chargeEffect)) { Transform val = childLocator.FindChild("GunChargeEffect"); chargeEffectInstance = Object.Instantiate(chargeEffect, val); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); float num = CalcCharge(); if (num >= 1f && !hasFinishedCharging) { hasFinishedCharging = true; Util.PlaySound("NemmandoSubmissionReady", ((EntityState)this).gameObject); } if (((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= 0.1f) { BarrageFire barrageFire = new BarrageFire(); barrageFire.charge = num; ((EntityState)this).outer.SetNextState((EntityState)(object)barrageFire); } } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); } public override void OnExit() { ((EntityState)this).OnExit(); AkSoundEngine.StopPlayingID(chargePlayID); if (Object.op_Implicit((Object)(object)chargeEffectInstance)) { EntityState.Destroy((Object)(object)chargeEffectInstance); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class BarrageFire : RendHandler { [TokenModifier(/*Could not decode attribute arguments.*/)] public static float damageCoefficient; public static float procCoefficient; public static uint bulletCountPerShot; public static float range; public static float maxSpread; public static int minBulletCount; [TokenModifier(/*Could not decode attribute arguments.*/)] public static int maxBulletCount; public static float baseDuration; public static float minTimeBetweenShots; public static float maxTimeBetweenShots; public static float recoil; public static GameObject tracerPrefab; private int totalBulletsFired; private int bulletCount; public float stopwatchBetweenShots; public float charge; private Animator modelAnimator; private Transform modelTransform; private float duration; private float durationBetweenShots; private GameObject muzzleFlashEffect = Resources.Load("Prefabs/Effects/ImpactEffects/FusionCellExplosion"); public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetSpreadBloom(0.2f, false); ((EntityState)this).characterBody.isSprinting = false; duration = baseDuration; durationBetweenShots = Util.Remap(charge, 0f, 1f, minTimeBetweenShots, maxTimeBetweenShots) / ((BaseState)this).attackSpeedStat; bulletCount = (int)((float)Mathf.RoundToInt(Util.Remap(charge, 0f, 1f, (float)minBulletCount, (float)maxBulletCount)) * ((BaseState)this).attackSpeedStat); modelAnimator = ((EntityState)this).GetModelAnimator(); modelTransform = ((EntityState)this).GetModelTransform(); ((EntityState)this).characterBody.SetAimTimer(2f); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; FireBullet(); } private void FireBullet() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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_00e1: 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_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_010f: 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_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0138: 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_014a: 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_0151: 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_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_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_0191: Expected O, but got Unknown Ray aimRay = ((BaseState)this).GetAimRay(); string text = "Muzzle"; EffectManager.SimpleMuzzleFlash(FireBarrage.effectPrefab, ((EntityState)this).gameObject, text, false); Util.PlaySound("NemmandoSubmissionFire", ((EntityState)this).gameObject); ((EntityState)this).PlayCrossfade("Gesture, Additive", "FireGun", "FireGun.playbackRate", durationBetweenShots, durationBetweenShots / 2f); ((BaseState)this).AddRecoil(-0.8f * recoil, -1f * recoil, -0.1f * recoil, 0.15f * recoil); if (((EntityState)this).isAuthority) { BulletAttack val = new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0f, maxSpread = maxSpread, bulletCount = bulletCountPerShot, damage = damageCoefficient * ((BaseState)this).damageStat, force = 0.5f * FireBarrage.force, tracerEffectPrefab = tracerPrefab, muzzleName = text, hitEffectPrefab = FireBarrage.hitEffectPrefab, isCrit = ((BaseState)this).RollCrit(), radius = FireBarrage.bulletRadius, smartCollision = true, damageType = (DamageType)0, spreadPitchScale = 0.5f, spreadYawScale = 0.5f, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, falloffModel = (FalloffModel)1, maxDistance = range }; RendMultiplier(val); val.Fire(); } ((EntityState)this).characterBody.AddSpreadBloom(2f * FireBarrage.spreadBloomValue); totalBulletsFired++; } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).PlayCrossfade("Gesture, Override", "BufferEmpty", "", 1f, 0.4f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatchBetweenShots += Time.fixedDeltaTime; if (stopwatchBetweenShots >= durationBetweenShots && totalBulletsFired < bulletCount) { stopwatchBetweenShots -= durationBetweenShots; FireBullet(); } if (((EntityState)this).fixedAge >= duration && totalBulletsFired == bulletCount && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class BossAttack : BaseSkillState { public float charge; public static float baseDuration; [TokenModifier(/*Could not decode attribute arguments.*/)] public static int maxHits; public static int minHits; [TokenModifier(/*Could not decode attribute arguments.*/)] public static float maxDamageCoefficient; public static float minDamageCoefficient; public static float maxRadius; public static float minRadius; public static float maxEmission; public static float minEmission; public static GameObject effectPrefab; private float hitStopwatch; private float duration; private int hitCount; private float damageCoefficient; private float radius; private float emission; private BlastAttack blastAttack; private EffectData attackEffect; public Material swordMat; public Material matInstance; private float minimumEmission; private string skinNameToken; public CameraParamsOverrideHandle camOverrideHandle; public override void OnEnter() { //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0140: 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_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0241: 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_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Expected O, but got Unknown //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Expected O, but got Unknown //IL_0306: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.isSprinting = false; duration = baseDuration / ((BaseState)this).attackSpeedStat; hitCount = Mathf.RoundToInt(Util.Remap(charge, 0f, 1f, (float)minHits, (float)maxHits)); SS2Log.Debug("hit count inital: " + hitCount + "| " + ((EntityState)this).characterBody.attackSpeed, 51, "OnEnter"); int num = (int)((float)hitCount * (0.5f * ((EntityState)this).characterBody.attackSpeed + 0.5f)); hitCount = Mathf.Max(hitCount, num); SS2Log.Debug("hit count after: " + hitCount, 54, "OnEnter"); damageCoefficient = maxDamageCoefficient; radius = maxRadius; emission = Util.Remap(charge, 0f, 1f, minEmission, maxEmission); ((EntityState)this).characterBody.hideCrosshair = false; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); skinNameToken = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; if (skinNameToken != "SS2_SKIN_NEMCOMMANDO_DEFAULT" && skinNameToken != "SS2_SKIN_NEMCOMMANDO_GRANDMASTERY") { if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_MASTERY") { effectPrefab = SS2Assets.LoadAsset("DecisiveStrikeSlashYellow", SS2Bundle.NemCommando); } if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_COMMANDO") { effectPrefab = SS2Assets.LoadAsset("DecisiveStrikeSlashBlue", SS2Bundle.NemCommando); } } else { effectPrefab = SS2Assets.LoadAsset("DecisiveStrikeSlash", SS2Bundle.NemCommando); } blastAttack = new BlastAttack { attacker = ((EntityState)this).gameObject, attackerFiltering = (AttackerFiltering)2, baseDamage = damageCoefficient * ((BaseState)this).damageStat, baseForce = -500f, bonusForce = Vector3.zero, crit = ((BaseState)this).RollCrit(), damageColorIndex = (DamageColorIndex)0, damageType = (DamageType)0, falloffModel = (FalloffModel)0, inflictor = ((EntityState)this).gameObject, losType = (LoSType)0, position = ((EntityState)this).characterBody.corePosition, procChainMask = default(ProcChainMask), procCoefficient = 1f, radius = radius, teamIndex = ((BaseState)this).GetTeam() }; DamageAPI.AddModdedDamageType(blastAttack, Moonstorm.Starstorm2.DamageTypes.Gouge.gougeDamageType); ((EntityState)this).characterMotor.rootMotion = Vector3.zero; ((EntityState)this).characterMotor.velocity = Vector3.zero; if (charge >= 0.4f) { EffectData val = new EffectData(); val.scale = ((EntityState)this).characterBody.bestFitRadius * 10f; val.origin = ((EntityState)this).characterBody.corePosition; EffectManager.SpawnEffect(effectPrefab, val, true); } FireAttack(); if (charge >= 0.6f) { ((EntityState)this).PlayAnimation("FullBody, Override", "DecisiveStrikeMax", "DecisiveStrike.playbackRate", duration); Util.PlaySound("NemmandoDecisiveStrikeFire", ((EntityState)this).gameObject); } else { ((EntityState)this).PlayAnimation("FullBody, Override", "DecisiveStrike", "DecisiveStrike.playbackRate", duration); } } private void FireAttack() { //IL_0028: 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_0038: 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_005e: Expected O, but got Unknown //IL_007c: Unknown result type (might be due to invalid IL or missing references) hitStopwatch = duration / (float)hitCount; if (((EntityState)this).isAuthority) { blastAttack.position = ((EntityState)this).characterBody.corePosition; blastAttack.Fire(); if (hitCount > 0) { Util.PlaySound(GroundLight.hitSoundString, ((EntityState)this).gameObject); } EffectData val = new EffectData(); val.scale = ((EntityState)this).characterBody.bestFitRadius * 10f; val.origin = ((EntityState)this).characterBody.corePosition; EffectManager.SpawnEffect(effectPrefab, val, true); } } public override void FixedUpdate() { //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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); hitStopwatch -= Time.fixedDeltaTime; emission -= 2f * Time.fixedDeltaTime; if (emission < 0f) { emission = 0f; } ((EntityState)this).characterMotor.rootMotion = Vector3.zero; ((EntityState)this).characterMotor.velocity = Vector3.zero; int num = 0; while (hitStopwatch <= 0f && num < hitCount) { FireAttack(); num++; } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0018: 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_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); emission = 0f; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, duration / 1.5f); } ref RendererInfo reference = ref ((Component)((EntityState)this).GetModelTransform()).GetComponent().baseRendererInfos[1]; if (Object.op_Implicit((Object)(object)matInstance)) { reference.defaultMaterial = swordMat; swordMat.SetFloat("_EmPower", 1f); reference.defaultMaterial.SetFloat("_EmPower", 1f); Object.Destroy((Object)(object)matInstance); } reference.defaultMaterial.SetFloat("_EmPower", 1f); } } public class BossAttackCharge : BaseSkillState { public static float baseChargeDuration; public static GameObject chargeEffect; public static string childName; private float chargeDuration; private bool finishedCharge; private ChildLocator childLocator; private Animator animator; private Transform modelBaseTransform; private uint chargePlayID; private ParticleSystem swordVFX; private bool zoomin; private Material swordMat; private float minEmission; private GameObject chargeEffectInstance; private Transform areaIndicator; private string skinNameToken; public CameraParamsOverrideHandle camOverrideHandle; private CharacterCameraParamsData decisiveCameraParams = new CharacterCameraParamsData { maxPitch = BlendableFloat.op_Implicit(70f), minPitch = BlendableFloat.op_Implicit(-70f), pivotVerticalOffset = BlendableFloat.op_Implicit(1f), idealLocalCameraPos = BlendableVector3.op_Implicit(zoomCameraPosition), wallCushion = BlendableFloat.op_Implicit(0.1f) }; public static Vector3 zoomCameraPosition = new Vector3(0f, 0f, -5.3f); private Material matInstance; public override void OnEnter() { //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Invalid comparison between Unknown and I4 //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); chargeDuration = baseChargeDuration / ((BaseState)this).attackSpeedStat; childLocator = ((EntityState)this).GetModelChildLocator(); modelBaseTransform = ((EntityState)this).GetModelBaseTransform(); animator = ((EntityState)this).GetModelAnimator(); zoomin = false; ((EntityState)this).characterBody.hideCrosshair = true; if (Object.op_Implicit((Object)(object)chargeEffect)) { Transform val = childLocator.FindChild(childName); skinNameToken = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; if (skinNameToken != "SS2_SKIN_NEMCOMMANDO_DEFAULT" && skinNameToken != "SS2_SKIN_NEMCOMMANDO_GRANDMASTERY") { if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_MASTERY") { chargeEffect = SS2Assets.LoadAsset("DecisiveStrikeChargeYellow", SS2Bundle.NemCommando); } if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_COMMANDO") { chargeEffect = SS2Assets.LoadAsset("DecisiveStrikeChargeBlue", SS2Bundle.NemCommando); } } else { chargeEffect = SS2Assets.LoadAsset("DecisiveStrikeChargeNew", SS2Bundle.NemCommando); } chargeEffectInstance = Object.Instantiate(chargeEffect, val); if (Object.op_Implicit((Object)(object)chargeEffectInstance)) { ChildLocator component = chargeEffectInstance.GetComponent(); MainModule main = ((Component)component.FindChild("Charge")).GetComponent().main; ((MainModule)(ref main)).startLifetime = MinMaxCurve.op_Implicit(chargeDuration); main = ((Component)component.FindChild("FullCharge")).GetComponent().main; ((MainModule)(ref main)).startDelay = MinMaxCurve.op_Implicit(chargeDuration); ParticleSystem[] componentsInChildren = chargeEffectInstance.GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].Play(); } } } chargePlayID = Util.PlayAttackSpeedSound("NemmandoDecisiveStrikeCharge", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); ((EntityState)this).PlayAnimation("FullBody, Override", "DecisiveStrikeCharge", "DecisiveStrike.playbackRate", chargeDuration); CameraParamsOverrideRequest val2 = default(CameraParamsOverrideRequest); val2.cameraParamsData = decisiveCameraParams; val2.priority = 0f; CameraParamsOverrideRequest val3 = val2; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val3, chargeDuration); ref RendererInfo reference = ref ((Component)((EntityState)this).GetModelTransform()).GetComponent().baseRendererInfos[1]; swordMat = reference.defaultMaterial; matInstance = Object.Instantiate(swordMat); reference.defaultMaterial = matInstance; if ((int)((BaseState)this).GetTeam() == 2) { chargeEffectInstance = Object.Instantiate(new BlinkState().blinkDestinationPrefab, ((EntityState)this).gameObject.transform); chargeEffectInstance.transform.position = ((EntityState)this).characterBody.corePosition; chargeEffectInstance.GetComponent().newDuration = chargeDuration; areaIndicator = chargeEffectInstance.transform.Find("Particles").Find("AreaIndicator"); chargeEffectInstance.GetComponentInChildren().maxDuration = chargeDuration; } } public override void FixedUpdate() { //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_005b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_00dc: Invalid comparison between Unknown and I4 //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterMotor.velocity = Vector3.zero; float num = CalcCharge(); matInstance.SetFloat("_EmPower", Util.Remap(num, 0f, 1f, minEmission, BossAttack.maxEmission)); if (Object.op_Implicit((Object)(object)areaIndicator)) { areaIndicator.localScale = Vector3.one * Util.Remap(num, 0f, 1f, BossAttack.minRadius, BossAttack.maxRadius); } if (num >= 0.6f && !zoomin) { zoomin = true; } if (num >= 1f && !finishedCharge) { finishedCharge = true; AkSoundEngine.StopPlayingID(chargePlayID); Util.PlaySound("NemmandoDecisiveStrikeReady", ((EntityState)this).gameObject); } bool flag = ((BaseSkillState)this).IsKeyDownAuthority(); if ((int)((BaseState)this).GetTeam() == 2) { flag = true; } if (((EntityState)this).isAuthority && (((EntityState)this).fixedAge >= 1.25f * chargeDuration || (!flag && ((EntityState)this).fixedAge >= 0.1f))) { BossAttackEntry bossAttackEntry = new BossAttackEntry(); bossAttackEntry.charge = num; bossAttackEntry.camOverrideHandle = camOverrideHandle; bossAttackEntry.matInstance = matInstance; bossAttackEntry.swordMat = swordMat; ((EntityState)this).outer.SetNextState((EntityState)(object)bossAttackEntry); } } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)chargeEffectInstance)) { EntityState.Destroy((Object)(object)chargeEffectInstance); } ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); AkSoundEngine.StopPlayingID(chargePlayID); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class BossAttackEntry : BaseSkillState { public float charge; public static float maxRecoil; public static float minRecoil; public static float initialMaxSpeedCoefficient; public static float initialMinSpeedCoefficient; public static float minDuration; public static float maxDuration; public static GameObject dashEffect; private float speedCoefficient; private float recoil; private float duration; private float dashSpeed; private Vector3 forwardDirection; private Vector3 previousPosition; private ChildLocator childLocator; private GameObject dashEffectInstance; public CameraParamsOverrideHandle camOverrideHandle; private CharacterCameraParamsData decisiveCameraParams = new CharacterCameraParamsData { maxPitch = BlendableFloat.op_Implicit(70f), minPitch = BlendableFloat.op_Implicit(-70f), pivotVerticalOffset = BlendableFloat.op_Implicit(2f), idealLocalCameraPos = BlendableVector3.op_Implicit(zoomCameraPosition), wallCushion = BlendableFloat.op_Implicit(0.1f) }; public static Vector3 zoomCameraPosition = new Vector3(0f, 0f, -14f); public Material matInstance; public Material swordMat; public override void OnEnter() { //IL_0019: 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_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004a: 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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Invalid comparison between Unknown and I4 //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_018d: 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_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.isSprinting = true; ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 0.25f); CameraParamsOverrideRequest val = default(CameraParamsOverrideRequest); val.cameraParamsData = decisiveCameraParams; val.priority = 0f; CameraParamsOverrideRequest val2 = val; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val2, duration); duration = Util.Remap(charge, 0f, 1f, minDuration, maxDuration); speedCoefficient = Util.Remap(charge, 0f, 1f, initialMinSpeedCoefficient, initialMaxSpeedCoefficient); recoil = Util.Remap(charge, 0f, 1f, minRecoil, maxRecoil); if ((int)((BaseState)this).GetTeam() == 2) { speedCoefficient = 0f; } childLocator = ((EntityState)this).GetModelChildLocator(); Ray aimRay = ((BaseState)this).GetAimRay(); forwardDirection = ((Ray)(ref aimRay)).direction; RecalculateSpeed(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterMotor.velocity.y *= 0.1f; ((EntityState)this).characterMotor.velocity = forwardDirection * dashSpeed; } ((EntityState)this).PlayAnimation("FullBody, Override", "DecisiveStrikeDash"); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); Vector3 val3 = (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) ? ((EntityState)this).characterMotor.velocity : Vector3.zero); previousPosition = ((EntityState)this).transform.position - val3; if (Object.op_Implicit((Object)(object)dashEffect)) { Transform val4 = childLocator.FindChild("DashEffect"); dashEffectInstance = Object.Instantiate(dashEffect, val4); if (Object.op_Implicit((Object)(object)dashEffectInstance)) { ParticleSystem[] componentsInChildren = dashEffectInstance.GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].Play(); } } } Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlay obj = ((Component)modelTransform).gameObject.AddComponent(); obj.duration = 1.5f * duration; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = Resources.Load("Materials/matDoppelganger"); obj.AddToCharacerModel(((Component)modelTransform).GetComponent()); } } private void RecalculateSpeed() { dashSpeed = (4f + 0.25f * ((BaseState)this).moveSpeedStat) * speedCoefficient; } public override void OnExit() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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_0038: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.disableAirControlUntilCollision = false; } ((EntityState)this).characterMotor.velocity = Vector3.zero; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); if (Object.op_Implicit((Object)(object)dashEffectInstance)) { EntityState.Destroy((Object)(object)dashEffectInstance); } ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: 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_0112: 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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: 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_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.isSprinting = true; if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { BossAttack bossAttack = new BossAttack(); bossAttack.charge = charge; bossAttack.camOverrideHandle = camOverrideHandle; bossAttack.matInstance = matInstance; bossAttack.swordMat = swordMat; ((EntityState)this).outer.SetNextState((EntityState)(object)bossAttack); return; } RecalculateSpeed(); if (!((EntityState)this).isAuthority) { return; } Vector3 val = ((EntityState)this).transform.position - previousPosition; Vector3 normalized = ((Vector3)(ref val)).normalized; if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { if (normalized != Vector3.zero) { Vector3 val2 = normalized * dashSpeed; float num = Mathf.Max(Vector3.Dot(val2, forwardDirection), 0f); val2 = forwardDirection * num; val2.y = ((EntityState)this).characterMotor.velocity.y; ((EntityState)this).characterMotor.velocity = val2; } ((EntityState)this).characterDirection.forward = forwardDirection; } previousPosition = ((EntityState)this).transform.position; } public override void OnSerialize(NetworkWriter writer) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnSerialize(writer); writer.Write(forwardDirection); } public override void OnDeserialize(NetworkReader reader) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnDeserialize(reader); forwardDirection = reader.ReadVector3(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class Dodge : BaseSkillState { public float duration = 0.6f; public float initialSpeedCoefficient = 7.5f; public float finalSpeedCoefficient = 1f; public static float dodgeFOV = -1f; public static GameObject JetEffect; private float rollSpeed; private Vector3 forwardDirection; private Vector3 previousPosition; private Animator animator; public override void OnEnter() { //IL_0128: 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_0138: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: 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_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: 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_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); ChildLocator component = ((Component)animator).GetComponent(); Util.PlaySound(DodgeState.dodgeSoundString, ((EntityState)this).gameObject); ((EntityState)this).PlayCrossfade("FullBody, Override", "Utility", "Utility.rate", duration * 1.25f, 0.05f); ((EntityState)this).PlayCrossfade("Gesture, Override", "BufferEmpty", 0.05f); if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(Buffs.ArmorBoost, 1.5f * duration); } if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).inputBank.moveVector); forwardDirection = ((Vector3)(ref val)).normalized; } RecalculateRollSpeed(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterMotor.velocity.y = 0f; ((EntityState)this).characterMotor.velocity = forwardDirection * rollSpeed; } if (Object.op_Implicit((Object)(object)JetEffect)) { Transform val2 = component.FindChild("JetMuzzleL"); Transform val3 = component.FindChild("JetMuzzleR"); if (Object.op_Implicit((Object)(object)val2)) { Object.Instantiate(JetEffect, val2); } if (Object.op_Implicit((Object)(object)val3)) { Object.Instantiate(JetEffect, val3); } } Vector3 val4 = (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) ? ((EntityState)this).characterMotor.velocity : Vector3.zero); previousPosition = ((EntityState)this).transform.position - val4; } private void RecalculateRollSpeed() { rollSpeed = ((BaseState)this).moveSpeedStat * Mathf.Lerp(initialSpeedCoefficient, finalSpeedCoefficient, ((EntityState)this).fixedAge / duration); } public override void FixedUpdate() { //IL_001d: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0147: 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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009f: 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_00ab: 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_00c9: 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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: 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_00f7: 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_00ff: 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_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); RecalculateRollSpeed(); if (((EntityState)this).isAuthority) { Vector3 val = ((EntityState)this).transform.position - previousPosition; Vector3 normalized = ((Vector3)(ref val)).normalized; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && normalized != Vector3.zero) { Vector3 val2 = normalized * rollSpeed; float y = val2.y; val2.y = 0f; float num = Mathf.Max(Vector3.Dot(val2, forwardDirection), 0f); val2 = forwardDirection * num; val2.y += Mathf.Max(y, 0f); ((EntityState)this).characterMotor.velocity = val2; Vector3 val3 = (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) ? ((EntityState)this).characterDirection.forward : forwardDirection); Vector3 val4 = Vector3.Cross(Vector3.up, val3); float num2 = Vector3.Dot(forwardDirection, val3); float num3 = Vector3.Dot(forwardDirection, val4); animator.SetFloat("forwardSpeed", num2); animator.SetFloat("rightSpeed", num3); } previousPosition = ((EntityState)this).transform.position; if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } } public override void OnExit() { if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.fovOverride = -1f; } ((EntityState)this).OnExit(); } public override void OnSerialize(NetworkWriter writer) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnSerialize(writer); writer.Write(forwardDirection); } public override void OnDeserialize(NetworkReader reader) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnDeserialize(reader); forwardDirection = reader.ReadVector3(); } } public class NemmandoSpawnState : NemesisSpawnState { public override void SpawnEffect() { portalMuzzle = "PortalSpawn"; base.SpawnEffect(); } } public class RendHandler : BaseSkillState { [SerializeField] public float RendBaseDamageMultiplier; public void RendMultiplier(BulletAttack bulletAttack) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown bulletAttack.modifyOutgoingDamageCallback = (ModifyOutgoingDamageCallback)delegate(BulletAttack _bulletAttack, ref BulletHit hitInfo, DamageInfo damageInfo) { //IL_0071: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)hitInfo.hitHurtBox) && Object.op_Implicit((Object)(object)hitInfo.hitHurtBox.healthComponent) && Object.op_Implicit((Object)(object)hitInfo.hitHurtBox.healthComponent.body)) { CharacterBody body = hitInfo.hitHurtBox.healthComponent.body; if (Object.op_Implicit((Object)(object)body) && body.HasBuff(SS2Content.Buffs.BuffGouge)) { damageInfo.damage *= RendBaseDamageMultiplier; damageInfo.damageColorIndex = (DamageColorIndex)2; } } }; } } public class ScepterBarrageCharge : BaseSkillState { public static float baseChargeDuration = 1.5f; public static GameObject chargeEffect; public static GameObject scepterChargeEffect; private float chargeDuration; private ChildLocator childLocator; private Animator animator; private Transform modelBaseTransform; private uint chargePlayID; private bool hasFinishedCharging; private GameObject chargeEffectInstance; private int chargeState; private List chargeEffectInstances; public override void OnEnter() { ((BaseState)this).OnEnter(); chargeDuration = baseChargeDuration; childLocator = ((EntityState)this).GetModelChildLocator(); modelBaseTransform = ((EntityState)this).GetModelBaseTransform(); animator = ((EntityState)this).GetModelAnimator(); hasFinishedCharging = false; chargePlayID = Util.PlaySound("NemmandoSubmissionCharge", ((EntityState)this).gameObject); chargeState = 0; chargeEffectInstances = new List(); if (Object.op_Implicit((Object)(object)chargeEffect)) { Transform val = childLocator.FindChild("GunChargeEffect"); chargeEffectInstance = Object.Instantiate(chargeEffect, val); chargeEffectInstances.Add(chargeEffectInstance); chargeState++; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); float num = CalcCharge(); if ((double)num >= 0.3 * (double)(chargeState - 1) && chargeState == chargeEffectInstances.Count && (double)num < 0.5) { if (Object.op_Implicit((Object)(object)scepterChargeEffect)) { Transform val = childLocator.FindChild("GunChargeEffect"); chargeEffectInstance = Object.Instantiate(scepterChargeEffect, val); chargeEffectInstances.Add(chargeEffectInstance); } chargeState++; } if (num >= 1f && !hasFinishedCharging) { hasFinishedCharging = true; Util.PlaySound("NemmandoSubmissionReady", ((EntityState)this).gameObject); } if (((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= 0.1f) { ScepterBarrageFire scepterBarrageFire = new ScepterBarrageFire(); scepterBarrageFire.charge = num; ((EntityState)this).outer.SetNextState((EntityState)(object)scepterBarrageFire); } } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); } public override void OnExit() { ((EntityState)this).OnExit(); AkSoundEngine.StopPlayingID(chargePlayID); if (Object.op_Implicit((Object)(object)chargeEffectInstance)) { EntityState.Destroy((Object)(object)chargeEffectInstance); } if (chargeEffectInstances.Count > 0) { for (int i = 0; i < chargeEffectInstances.Count; i++) { EntityState.Destroy((Object)(object)chargeEffectInstances[i]); } } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class ScepterBarrageFire : BaseState { public float charge; [TokenModifier(/*Could not decode attribute arguments.*/)] public static float laserDamageCoefficient; public static float laserBlastRadius; public static float laserBlastForce; [TokenModifier(/*Could not decode attribute arguments.*/)] public static float damageCoefficient = 0.6f; public static float procCoefficient = 0.5f; public static uint bulletCountPerShot = 4u; public static float range = 128f; public static float maxSpread = 40f; public static int minBulletCount = 2; [TokenModifier(/*Could not decode attribute arguments.*/)] public static int maxBulletCount = 6; public static float baseDuration = 0.8f; public static float minTimeBetweenShots = 0.2f; public static float maxTimeBetweenShots = 0.075f; public static float recoil = 5f; public static GameObject tracerPrefab; private int totalBulletsFired; private int bulletCount; public float stopwatchBetweenShots; private Animator modelAnimator; private Transform modelTransform; private float duration; private float durationBetweenShots; private GameObject muzzleFlashEffect = Resources.Load("Prefabs/Effects/ImpactEffects/FusionCellExplosion"); public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetSpreadBloom(0.2f, false); ((EntityState)this).characterBody.isSprinting = false; duration = baseDuration; durationBetweenShots = Util.Remap(charge, 0f, 1f, minTimeBetweenShots, maxTimeBetweenShots) / base.attackSpeedStat; bulletCount = (int)((float)Mathf.RoundToInt(Util.Remap(charge, 0f, 1f, (float)minBulletCount, (float)maxBulletCount)) * base.attackSpeedStat); modelAnimator = ((EntityState)this).GetModelAnimator(); modelTransform = ((EntityState)this).GetModelTransform(); ((EntityState)this).characterBody.SetAimTimer(2f); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; FireBullet(); } private void FireBullet() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_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_00de: 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_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013e: 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_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0160: 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_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018a: 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_019b: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); string text = "Muzzle"; EffectManager.SimpleMuzzleFlash(FireBarrage.effectPrefab, ((EntityState)this).gameObject, text, false); ((EntityState)this).PlayCrossfade("UpperBody, Override", "Special", "Special.rate", durationBetweenShots, 0.05f); Util.PlaySound("NemmandoSubmissionFire", ((EntityState)this).gameObject); Util.PlaySound(FireLaser.attackSoundString, ((EntityState)this).gameObject); float num = recoil / base.attackSpeedStat; ((BaseState)this).AddRecoil(-0.8f * num, -1f * num, -0.1f * num, 0.15f * num); EffectManager.SimpleMuzzleFlash(FireLaser.effectPrefab, ((EntityState)this).gameObject, "Muzzle", false); if (((EntityState)this).isAuthority) { new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0f, maxSpread = maxSpread, bulletCount = bulletCountPerShot, damage = damageCoefficient * base.damageStat, force = 0.5f * FireBarrage.force, tracerEffectPrefab = tracerPrefab, muzzleName = text, hitEffectPrefab = FireBarrage.hitEffectPrefab, isCrit = ((BaseState)this).RollCrit(), radius = FireBarrage.bulletRadius, smartCollision = true, damageType = (DamageType)0, spreadPitchScale = 0.5f, spreadYawScale = 0.5f, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, falloffModel = (FalloffModel)1, maxDistance = range }.Fire(); FireLaser(); } ((EntityState)this).characterBody.AddSpreadBloom(2f * FireBarrage.spreadBloomValue); totalBulletsFired++; } private void FireLaser() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0009: 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_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: 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_0032: 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_0051: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_00ab: 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_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: 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_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_00e7: 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_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0138: 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_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0147: 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_0153: Expected O, but got Unknown Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = ((Ray)(ref aimRay)).origin + ((Ray)(ref aimRay)).direction * 1000f; RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(aimRay, ref val2, 1000f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.defaultLayer)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask))) { val = ((RaycastHit)(ref val2)).point; } new BlastAttack { attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject), baseDamage = base.damageStat * laserDamageCoefficient, baseForce = laserBlastForce * 0.2f, position = val, radius = laserBlastRadius, falloffModel = (FalloffModel)2, bonusForce = laserBlastForce * ((Ray)(ref aimRay)).direction, crit = ((BaseState)this).RollCrit() }.Fire(); if (!Object.op_Implicit((Object)(object)modelTransform)) { return; } ChildLocator component = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { int num = component.FindChildIndex("Muzzle"); if (Object.op_Implicit((Object)(object)FireLaser.tracerEffectPrefab)) { EffectData val3 = new EffectData { origin = val, start = ((Ray)(ref aimRay)).origin }; val3.SetChildLocatorTransformReference(((EntityState)this).gameObject, num); EffectManager.SpawnEffect(FireLaser.tracerEffectPrefab, val3, true); EffectManager.SpawnEffect(FireLaser.hitEffectPrefab, val3, true); } } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatchBetweenShots += Time.fixedDeltaTime; if (stopwatchBetweenShots >= durationBetweenShots && totalBulletsFired < bulletCount) { stopwatchBetweenShots -= durationBetweenShots; FireBullet(); } if (((EntityState)this).fixedAge >= duration && totalBulletsFired == bulletCount && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class ScepterSlashAttack : BaseSkillState { public static float baseDuration; [TokenModifier(/*Could not decode attribute arguments.*/)] public static int maxHits; public static int minHits; [TokenModifier(/*Could not decode attribute arguments.*/)] public static float maxDamageCoefficient; public static float minDamageCoefficient; public static float maxRadius; public static float minRadius; public static float maxEmission; public static float minEmission; public static GameObject preSlashEffectPrefab; public static GameObject slashEffectPrefab; public static GameObject sheatheEffectPrefab; public static GameObject stunEffectPrefab; public float charge; private float hitStopwatch; private int hitCount; private int hitsFired; private float duration; private float emission; private float radius; private float damageCoefficient; private EffectData attackEffect; private CharacterModel characterModel; private float minimumEmission; private bool isCrit; private bool hidden; public CameraParamsOverrideHandle camOverrideHandle; public Material matInstance; public Material swordMat; private List targetList; public override void OnEnter() { //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Expected O, but got Unknown //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.isSprinting = false; hitsFired = 0; hitCount = Mathf.RoundToInt(Util.Remap(charge, 0f, 1f, (float)minHits, (float)maxHits)); SS2Log.Debug("hit count inital: " + hitCount + "| " + ((EntityState)this).characterBody.attackSpeed, 65, "OnEnter"); int num = (int)((float)hitCount * ((EntityState)this).characterBody.attackSpeed); hitCount = Mathf.Max(hitCount, num); SS2Log.Debug("hit count after: " + hitCount, 68, "OnEnter"); duration = baseDuration; radius = Util.Remap(charge, 0f, 1f, minRadius, maxRadius); damageCoefficient = Util.Remap(charge, 0f, 1f, minDamageCoefficient, maxDamageCoefficient); emission = Util.Remap(charge, 0f, 1f, minEmission, maxEmission); isCrit = ((BaseState)this).RollCrit(); hidden = true; characterModel = ((Component)((EntityState)this).modelLocator.modelTransform).GetComponent(); ((EntityState)this).characterBody.hideCrosshair = true; if (((EntityState)this).characterBody.skinIndex == 2) { minimumEmission = 70f; } else { minimumEmission = 0f; } attackEffect = new EffectData { scale = 0.5f * radius, origin = ((EntityState)this).characterBody.corePosition }; EffectManager.SpawnEffect(preSlashEffectPrefab, attackEffect, true); ((EntityState)this).characterMotor.rootMotion = Vector3.zero; ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).PlayAnimation("FullBody, Override", "DecisiveStrike", "DecisiveStrike.playbackRate", duration); Util.PlaySound("NemmandoDecisiveStrikeFire", ((EntityState)this).gameObject); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } GetTargets(); if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; obj.invisibilityCount++; } } private void FireAttack() { //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0097: 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_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_00b4: Expected O, but got Unknown //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: 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) hitsFired++; if (targetList == null) { return; } hitStopwatch = 0.05f; foreach (HurtBox target in targetList) { if (Object.op_Implicit((Object)(object)target)) { HurtBoxGroup hurtBoxGroup = target.hurtBoxGroup; HurtBox val = hurtBoxGroup.hurtBoxes[Random.Range(0, hurtBoxGroup.hurtBoxes.Length - 1)]; if (Object.op_Implicit((Object)(object)val) && val.healthComponent.alive) { EffectData val2 = new EffectData { scale = 4f, origin = ((Component)val).transform.position, rotation = ((Component)val).transform.rotation }; EffectManager.SpawnEffect(slashEffectPrefab, val2, true); Util.PlaySound(GroundLight.hitSoundString, ((EntityState)this).gameObject); DamageInfo val3 = new DamageInfo(); val3.damage = damageCoefficient * ((BaseState)this).damageStat; val3.attacker = ((EntityState)this).gameObject; val3.procCoefficient = 1f; val3.position = ((Component)val).transform.position; val3.crit = isCrit; DamageAPI.AddModdedDamageType(val3, Moonstorm.Starstorm2.DamageTypes.Gouge.gougeDamageType); val.healthComponent.TakeDamage(val3); GlobalEventManager.instance.OnHitEnemy(val3, ((Component)val.healthComponent).gameObject); GlobalEventManager.instance.OnHitAll(val3, ((Component)val.healthComponent).gameObject); } } } } private void GetTargets() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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_00d6: 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_00f1: Expected O, but got Unknown //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) targetList = new List(); ((BaseState)this).GetAimRay(); SphereSearch val = new SphereSearch { mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask }; val.ClearCandidates(); val.origin = ((EntityState)this).transform.position; val.radius = radius; val.RefreshCandidates(); val.FilterCandidatesByDistinctHurtBoxEntities(); val.FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(((EntityState)this).teamComponent.teamIndex)); val.GetHurtBoxes(targetList); if (!NetworkServer.active) { return; } foreach (HurtBox target in targetList) { if ((Object)(object)target.healthComponent != (Object)(object)((EntityState)this).healthComponent && target.healthComponent.alive) { attackEffect = new EffectData { scale = 0.5f * radius, origin = target.healthComponent.body.corePosition }; EffectManager.SpawnEffect(stunEffectPrefab, attackEffect, true); NemmandoDashOrb nemmandoDashOrb = new NemmandoDashOrb(); ((Orb)nemmandoDashOrb).origin = ((EntityState)this).transform.position; ((Orb)nemmandoDashOrb).target = target; OrbManager.instance.AddOrb((Orb)(object)nemmandoDashOrb); } } } public override void FixedUpdate() { //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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: 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_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Expected O, but got Unknown //IL_0162: 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_0172: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Expected O, but got Unknown ((EntityState)this).FixedUpdate(); hitStopwatch -= Time.fixedDeltaTime; emission -= 10f * Time.fixedDeltaTime; if (emission < 0f) { emission = 0f; } ((EntityState)this).characterMotor.rootMotion = Vector3.zero; ((EntityState)this).characterMotor.velocity = Vector3.zero; if (((EntityState)this).fixedAge >= 0.4f * duration && hidden) { hidden = false; if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; obj.invisibilityCount--; } ((EntityState)this).PlayAnimation("FullBody, Override", "ScepterSpecial", "DecisiveStrike.playbackRate", 1f); EffectData val = new EffectData { scale = 4f, origin = ((Component)characterModel).transform.position, rotation = ((Component)characterModel).transform.rotation }; EffectManager.SpawnEffect(preSlashEffectPrefab, val, true); } if (((EntityState)this).fixedAge >= duration && hitsFired < hitCount && hitStopwatch <= 0f) { if (hitsFired == 0) { ((EntityState)this).PlayAnimation("FullBody, Override", "ScepterSpecialEnd", "DecisiveStrike.playbackRate", 1.4f); EffectData val2 = new EffectData { scale = 4f, origin = ((Component)characterModel).transform.position, rotation = ((Component)characterModel).transform.rotation }; EffectManager.SpawnEffect(sheatheEffectPrefab, val2, true); } FireAttack(); } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration && hitsFired >= hitCount) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_001a: 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) ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, duration / 1.5f); } if (Object.op_Implicit((Object)(object)matInstance)) { ((Component)((EntityState)this).GetModelTransform()).GetComponent().baseRendererInfos[1].defaultMaterial = swordMat; Object.Destroy((Object)(object)matInstance); } if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } } } public class ScepterSlashCharge : BaseSkillState { public static float baseChargeDuration; public static GameObject chargeEffect; public static string childName; private float chargeDuration; private bool finishedCharge; private ChildLocator childLocator; private Animator animator; private Transform modelBaseTransform; private uint chargePlayID; private ParticleSystem swordVFX; private bool zoomin; private Material swordMat; private float minEmission; private GameObject chargeEffectInstance; public CameraParamsOverrideHandle camOverrideHandle; private CharacterCameraParamsData decisiveCameraParams = new CharacterCameraParamsData { maxPitch = BlendableFloat.op_Implicit(70f), minPitch = BlendableFloat.op_Implicit(-70f), pivotVerticalOffset = BlendableFloat.op_Implicit(1f), idealLocalCameraPos = BlendableVector3.op_Implicit(zoomCameraPosition), wallCushion = BlendableFloat.op_Implicit(0.1f) }; public static Vector3 zoomCameraPosition = new Vector3(0f, 0f, -5.3f); private Material matInstance; public override void OnEnter() { //IL_016e: 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_017c: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); chargeDuration = baseChargeDuration; childLocator = ((EntityState)this).GetModelChildLocator(); modelBaseTransform = ((EntityState)this).GetModelBaseTransform(); animator = ((EntityState)this).GetModelAnimator(); zoomin = false; ((EntityState)this).characterBody.hideCrosshair = true; if (Object.op_Implicit((Object)(object)chargeEffect)) { Transform val = childLocator.FindChild(childName); chargeEffectInstance = Object.Instantiate(chargeEffect, val); if (Object.op_Implicit((Object)(object)chargeEffectInstance)) { ChildLocator component = chargeEffectInstance.GetComponent(); MainModule main = ((Component)component.FindChild("Charge")).GetComponent().main; ((MainModule)(ref main)).startLifetime = MinMaxCurve.op_Implicit(chargeDuration); main = ((Component)component.FindChild("Shadow")).GetComponent().main; ((MainModule)(ref main)).startLifetime = MinMaxCurve.op_Implicit(chargeDuration); main = ((Component)component.FindChild("FullCharge")).GetComponent().main; ((MainModule)(ref main)).startDelay = MinMaxCurve.op_Implicit(chargeDuration); ParticleSystem[] componentsInChildren = chargeEffectInstance.GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].Play(); } } } chargePlayID = Util.PlayAttackSpeedSound("NemmandoDecisiveStrikeCharge", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); ((EntityState)this).PlayAnimation("FullBody, Override", "DecisiveStrikeCharge", "DecisiveStrike.playbackRate", chargeDuration); CameraParamsOverrideRequest val2 = default(CameraParamsOverrideRequest); val2.cameraParamsData = decisiveCameraParams; val2.priority = 0f; CameraParamsOverrideRequest val3 = val2; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val3, chargeDuration); ref RendererInfo reference = ref ((Component)((EntityState)this).GetModelTransform()).GetComponent().baseRendererInfos[1]; swordMat = reference.defaultMaterial; matInstance = Object.Instantiate(swordMat); reference.defaultMaterial = matInstance; } public override void FixedUpdate() { //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_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) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterMotor.velocity = Vector3.zero; float num = CalcCharge(); matInstance.SetFloat("_EmPower", Util.Remap(num, 0f, 1f, 0f, 350f)); if (num >= 0.6f && !zoomin) { zoomin = true; } if (num >= 1f && !finishedCharge) { finishedCharge = true; AkSoundEngine.StopPlayingID(chargePlayID); Util.PlaySound("NemmandoDecisiveStrikeReady", ((EntityState)this).gameObject); } if (((EntityState)this).isAuthority && (((EntityState)this).fixedAge >= 1.25f * chargeDuration || (!((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= 0.1f))) { ScepterSlashEntry scepterSlashEntry = new ScepterSlashEntry(); scepterSlashEntry.charge = num; scepterSlashEntry.camOverrideHandle = camOverrideHandle; scepterSlashEntry.matInstance = matInstance; scepterSlashEntry.swordMat = swordMat; ((EntityState)this).outer.SetNextState((EntityState)(object)scepterSlashEntry); } } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty"); AkSoundEngine.StopPlayingID(chargePlayID); if (Object.op_Implicit((Object)(object)chargeEffectInstance)) { EntityState.Destroy((Object)(object)chargeEffectInstance); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class ScepterSlashEntry : BaseSkillState { public float charge; public static float maxRecoil; public static float minRecoil; public static float initialMaxSpeedCoefficient; public static float initialMinSpeedCoefficient; public static float minDuration; public static float maxDuration; public static GameObject dashEffect; private float speedCoefficient; private float recoil; private float duration; private float dashSpeed; private Vector3 forwardDirection; private Vector3 previousPosition; private ChildLocator childLocator; private GameObject dashEffectInstance; public CameraParamsOverrideHandle camOverrideHandle; private CharacterCameraParamsData decisiveCameraParams = new CharacterCameraParamsData { maxPitch = BlendableFloat.op_Implicit(70f), minPitch = BlendableFloat.op_Implicit(-70f), pivotVerticalOffset = BlendableFloat.op_Implicit(2f), idealLocalCameraPos = BlendableVector3.op_Implicit(zoomCameraPosition), wallCushion = BlendableFloat.op_Implicit(0.1f) }; public static Vector3 zoomCameraPosition = new Vector3(0f, 0f, -14f); public Material matInstance; public Material swordMat; public override void OnEnter() { //IL_0019: 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_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004a: 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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: 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_00ea: 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_0160: 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_0186: 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_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.isSprinting = true; ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 0.25f); CameraParamsOverrideRequest val = default(CameraParamsOverrideRequest); val.cameraParamsData = decisiveCameraParams; val.priority = 0f; CameraParamsOverrideRequest val2 = val; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val2, duration); duration = Util.Remap(charge, 0f, 1f, minDuration, maxDuration); speedCoefficient = Util.Remap(charge, 0f, 1f, initialMinSpeedCoefficient, initialMaxSpeedCoefficient); recoil = Util.Remap(charge, 0f, 1f, minRecoil, maxRecoil); childLocator = ((EntityState)this).GetModelChildLocator(); Ray aimRay = ((BaseState)this).GetAimRay(); forwardDirection = ((Ray)(ref aimRay)).direction; RecalculateSpeed(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterMotor.velocity.y *= 0.1f; ((EntityState)this).characterMotor.velocity = forwardDirection * dashSpeed; } ((EntityState)this).PlayAnimation("FullBody, Override", "DecisiveStrikeDash"); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); Vector3 val3 = (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) ? ((EntityState)this).characterMotor.velocity : Vector3.zero); previousPosition = ((EntityState)this).transform.position - val3; if (Object.op_Implicit((Object)(object)dashEffect)) { Transform val4 = childLocator.FindChild("DashEffect"); dashEffectInstance = Object.Instantiate(dashEffect, val4); if (Object.op_Implicit((Object)(object)dashEffectInstance)) { ParticleSystem[] componentsInChildren = dashEffectInstance.GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].Play(); } } } Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlay obj = ((Component)modelTransform).gameObject.AddComponent(); obj.duration = 1.5f * duration; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = Resources.Load("Materials/matDoppelganger"); obj.AddToCharacerModel(((Component)modelTransform).GetComponent()); } } private void RecalculateSpeed() { dashSpeed = (4f + 0.25f * ((BaseState)this).moveSpeedStat) * speedCoefficient; } public override void OnExit() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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_0038: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.disableAirControlUntilCollision = false; } ((EntityState)this).characterMotor.velocity = Vector3.zero; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); if (Object.op_Implicit((Object)(object)dashEffectInstance)) { EntityState.Destroy((Object)(object)dashEffectInstance); } ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: 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_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: 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_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_010b: 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_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011c: 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_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.isSprinting = true; if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { if (charge >= 1f) { ScepterSlashAttack scepterSlashAttack = new ScepterSlashAttack(); scepterSlashAttack.charge = charge; scepterSlashAttack.camOverrideHandle = camOverrideHandle; scepterSlashAttack.matInstance = matInstance; scepterSlashAttack.swordMat = swordMat; ((EntityState)this).outer.SetNextState((EntityState)(object)scepterSlashAttack); } else { BossAttack bossAttack = new BossAttack(); bossAttack.charge = charge; bossAttack.camOverrideHandle = camOverrideHandle; bossAttack.matInstance = matInstance; bossAttack.swordMat = swordMat; ((EntityState)this).outer.SetNextState((EntityState)(object)bossAttack); } return; } RecalculateSpeed(); if (!((EntityState)this).isAuthority) { return; } Vector3 val = ((EntityState)this).transform.position - previousPosition; Vector3 normalized = ((Vector3)(ref val)).normalized; if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { if (normalized != Vector3.zero) { Vector3 val2 = normalized * dashSpeed; float num = Mathf.Max(Vector3.Dot(val2, forwardDirection), 0f); val2 = forwardDirection * num; val2.y = ((EntityState)this).characterMotor.velocity.y; ((EntityState)this).characterMotor.velocity = val2; } ((EntityState)this).characterDirection.forward = forwardDirection; } previousPosition = ((EntityState)this).transform.position; } public override void OnSerialize(NetworkWriter writer) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnSerialize(writer); writer.Write(forwardDirection); } public override void OnDeserialize(NetworkReader reader) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnDeserialize(reader); forwardDirection = reader.ReadVector3(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class ShootGun : RendHandler { [TokenModifier(/*Could not decode attribute arguments.*/)] public static float damageCoefficient; public static float procCoefficient; public static float baseDuration; public static float force; public static float recoil; public static float range; public static string muzzleString; public static string soundString; [HideInInspector] public static GameObject tracerEffectPrefab = Resources.Load("Prefabs/Effects/Tracers/TracerGoldGat"); private float fireTime; private bool hasFired; private Animator animator; private float duration => baseDuration / ((BaseState)this).attackSpeedStat; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; fireTime = 0.1f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); muzzleString = "Muzzle"; ((BaseState)this).FindModelChildGameObject("GunSpinEffect").SetActive(false); ((EntityState)this).PlayCrossfade("RightArm, Override", "ShootGunShort", "ShootGun.playbackRate", duration, 0.05f); } public override void OnExit() { ((EntityState)this).OnExit(); float num = Mathf.Clamp(((EntityState)this).skillLocator.secondary.finalRechargeInterval, 0.25f, float.PositiveInfinity); ((EntityState)this).PlayAnimation("Gesture, Override", "ReloadGun", "Reload.playbackRate", 0.5f * (num - duration - 0.3f)); } private void Fire() { //IL_007b: 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_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_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_00cc: 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) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0155: 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_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: 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_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: 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_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Expected O, but got Unknown if (!hasFired) { hasFired = true; bool isCrit = ((BaseState)this).RollCrit(); EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); ((EntityState)this).PlayCrossfade("Gesture, Additive", "FireGun", "FireGun.playbackRate", duration, 0.075f); if (soundString != string.Empty) { Util.PlaySound(soundString, ((EntityState)this).gameObject); } if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * recoil, -2f * recoil, -0.5f * recoil, 0.5f * recoil); BulletAttack val = new BulletAttack { bulletCount = 1u, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, damageType = (DamageType)0, falloffModel = (FalloffModel)1, maxDistance = range, force = force, hitMask = CommonMasks.bullet, minSpread = 0f, maxSpread = 0f, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = false, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 0.75f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = tracerEffectPrefab, spreadPitchScale = 0f, spreadYawScale = 0f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = FirePistol2.hitEffectPrefab }; RendMultiplier(val); val.Fire(); ((EntityState)this).characterBody.AddSpreadBloom(1.5f); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireTime) { Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class Spawn : BaseState { public static float minimumIdleDuration = 3.5f; public static GameObject spawnEffectPrefab; public static GameObject spawnEffectFakePod; private Animator modelAnimator; private CharacterModel characterModel; private bool hasSpawnedPrefab; public override void OnEnter() { ((BaseState)this).OnEnter(); if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, minimumIdleDuration); } characterModel = null; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody.modelLocator) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.modelLocator.modelTransform)) { characterModel = ((Component)((EntityState)this).characterBody.modelLocator.modelTransform).GetComponent(); } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; obj.invisibilityCount++; } modelAnimator = ((EntityState)this).GetModelAnimator(); } public override void OnExit() { if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.SetFloat(AnimationParameters.aimWeight, 1f); } ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= minimumIdleDuration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Appear()); } } } internal class SwingSword : BasicMeleeAttack, IStepSetter { public static float swingTimeCoefficient = 1.33f; public int swingSide; [TokenModifier(/*Could not decode attribute arguments.*/)] public static float TokenModifier_dmgCoefficient => ((BasicMeleeAttack)new SwingSword()).damageCoefficient; public override void OnEnter() { ((BasicMeleeAttack)this).OnEnter(); base.animator = ((EntityState)this).GetModelAnimator(); } public override void PlayAnimation() { string text = ((swingSide == 0) ? "Primary1" : "Primary2"); ((EntityState)this).PlayCrossfade("Gesture, Override", text, "Primary.playbackRate", base.duration * swingTimeCoefficient, 0.1f); } void IStepSetter.SetStep(int i) { swingSide = i; base.swingEffectMuzzleString = ((swingSide == 0) ? "SwingLeft" : "SwingRight"); } public override void OnSerialize(NetworkWriter writer) { ((EntityState)this).OnSerialize(writer); writer.Write((byte)swingSide); } public override void OnDeserialize(NetworkReader reader) { ((EntityState)this).OnDeserialize(reader); swingSide = reader.ReadByte(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } public override void AuthorityModifyOverlapAttack(OverlapAttack overlapAttack) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)this).AuthorityModifyOverlapAttack(overlapAttack); DamageAPI.AddModdedDamageType(overlapAttack, Moonstorm.Starstorm2.DamageTypes.Gouge.gougeDamageType); } } public class ChargeSwordBeam : BaseSkillState { public static float baseChargeDuration = 1.25f; public static float maxEmission; public static float minEmission; public static GameObject lightningEffect; private Material swordMat; private float chargeDuration; private ChildLocator childLocator; private Animator animator; private Transform modelBaseTransform; private GameObject effectInstance; private GameObject defaultCrosshair; private uint chargePlayID; public override void OnEnter() { ((BaseState)this).OnEnter(); chargeDuration = baseChargeDuration / ((BaseState)this).attackSpeedStat; childLocator = ((EntityState)this).GetModelChildLocator(); modelBaseTransform = ((EntityState)this).GetModelBaseTransform(); animator = ((EntityState)this).GetModelAnimator(); defaultCrosshair = ((EntityState)this).characterBody.defaultCrosshairPrefab; if (Object.op_Implicit((Object)(object)lightningEffect)) { effectInstance = Object.Instantiate(lightningEffect, childLocator.FindChild("LightingEffect")); effectInstance.GetComponentInChildren().Play(); } ((EntityState)this).PlayCrossfade("Gesture, Override", "Secondary1", "Secondary.playbackRate", chargeDuration, 0.05f); swordMat = ((Component)((EntityState)this).GetModelTransform()).GetComponent().baseRendererInfos[1].defaultMaterial; chargePlayID = Util.PlaySound("NemmandoChargeBeam2", ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); float num = CalcCharge(); ((EntityState)this).characterBody.SetSpreadBloom(Util.Remap(num, 0f, 1f, 0f, 3f), true); ((BaseState)this).StartAimMode(2f, false); if (Object.op_Implicit((Object)(object)swordMat)) { swordMat.SetFloat("_EmPower", Util.Remap(num, 0f, 1f, minEmission, maxEmission)); } if (((EntityState)this).isAuthority && (num >= 1f || (!((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= 0.1f))) { FireSwordBeam fireSwordBeam = new FireSwordBeam(); fireSwordBeam.charge = num; ((EntityState)this).outer.SetNextState((EntityState)(object)fireSwordBeam); } } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); } public override void OnExit() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); swordMat.SetFloat("_EmPower", minEmission); swordMat.SetColor("_EmColor", Color.red); if (Object.op_Implicit((Object)(object)effectInstance)) { EntityState.Destroy((Object)(object)effectInstance); } AkSoundEngine.StopPlayingID(chargePlayID); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class FireSwordBeam : BaseSkillState { public float charge; public static float maxEmission; public static float minEmission; [TokenModifier(/*Could not decode attribute arguments.*/)] public static float maxDamageCoefficient; public static float minDamageCoeffficient; public static float procCoefficient; public static float maxRecoil; public static float minRecoil; public static float maxProjectileSpeed; public static float minProjectileSpeed; public static float baseDuration; public static GameObject projectilePrefab; private float emission; private Material swordMat; private float damageCoefficient; private float recoil; private float projectileSpeed; private float duration; private float fireDuration; private bool hasFired; private Animator animator; private string muzzleString; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); muzzleString = "Muzzle"; hasFired = false; duration = baseDuration / ((BaseState)this).attackSpeedStat; damageCoefficient = Util.Remap(charge, 0f, 1f, minDamageCoeffficient, maxDamageCoefficient); recoil = Util.Remap(charge, 0f, 1f, minRecoil, maxRecoil); projectileSpeed = Util.Remap(charge, 0f, 1f, minProjectileSpeed, maxProjectileSpeed); emission = Util.Remap(charge, 0f, 1f, minEmission, maxEmission); fireDuration = 0.1f * duration; string text = ((charge > 0.6f) ? "Secondary3(Strong)" : "Secondary3(Weak)"); bool @bool = animator.GetBool("isMoving"); bool bool2 = animator.GetBool("isGrounded"); if (!@bool && bool2) { ((EntityState)this).PlayCrossfade("FullBody, Override", text, "Secondary.playbackRate", duration, 0.05f); } ((EntityState)this).PlayCrossfade("Gesture, Override", text, "Secondary.playbackRate", duration, 0.05f); swordMat = ((Component)((EntityState)this).GetModelTransform()).GetComponent().baseRendererInfos[1].defaultMaterial; Util.PlaySound("NemmandoFireBeam2", ((EntityState)this).gameObject); } public override void OnExit() { ((EntityState)this).OnExit(); } public virtual void FireBeam() { //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: 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_00ae: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; EffectManager.SimpleMuzzleFlash(FireBarrage.effectPrefab, ((EntityState)this).gameObject, muzzleString, false); if (((EntityState)this).isAuthority) { float num = damageCoefficient * ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * recoil); Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireDuration) { FireBeam(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } } namespace EntityStates.NemMerc { public class CloneDash : BaseSkillState { public bool hasHit; public bool dashVectorLocked; public GameObject target; public bool m2Buffered; private EntityStateMachine weapon; private int entryLayer; [NonSerialized] public Transform modelTransform; public static GameObject dashPrefab; public static float dashPrepDuration = 0.25f; public static float smallHopVelocity; public static float m2ExtraDashDuration = 0.1f; public static float m2HitPauseDuration = 0.33f; public static float dashDuration = 0.2f; public static float baseDashDistance = 20f; public static float dashBehindDistance = 5f; public static string beginSoundString; public static string endSoundString; public static float damageCoefficient = 3f; public static float procCoefficient = 1f; public static GameObject hitEffectPrefab; public static float hitPauseDuration = 0.15f; private float dashSpeed; private bool isDashing; [NonSerialized] public float stopwatch; [NonSerialized] public Vector3 dashVector = Vector3.zero; [NonSerialized] public Animator animator; [NonSerialized] public CharacterModel characterModel; [NonSerialized] public HurtBoxGroup hurtboxGroup; [NonSerialized] public OverlapAttack overlapAttack; [NonSerialized] public ChildLocator childLocator; [NonSerialized] public bool inHitPause; [NonSerialized] public bool inM2HitPause; [NonSerialized] public float hitPauseTimer; [NonSerialized] public AimRequest aimRequest; public override void OnEnter() { //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0207: 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_015f: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound(beginSoundString, ((EntityState)this).gameObject); modelTransform = ((EntityState)this).GetModelTransform(); weapon = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Weapon"); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { aimRequest = ((EntityState)this).cameraTargetParams.RequestAimType((AimType)2); } if (Object.op_Implicit((Object)(object)modelTransform)) { animator = ((Component)modelTransform).GetComponent(); characterModel = ((Component)modelTransform).GetComponent(); childLocator = ((Component)modelTransform).GetComponent(); hurtboxGroup = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)childLocator)) { ((Component)childLocator.FindChild("PreDashEffect")).gameObject.SetActive(true); } } overlapAttack = ((BaseState)this).InitMeleeOverlap(damageCoefficient, hitEffectPrefab, modelTransform, "Assaulter"); overlapAttack.damageType = (DamageType)32; DamageAPI.AddModdedDamageType(overlapAttack, RedirectHologram.damageType); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = ((Ray)(ref aimRay)).GetPoint(baseDashDistance); CloneInputBank.CloneOwnership component = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.clone)) { entryLayer = LayerIndex.defaultLayer.intVal; Vector3 val2 = component.clone.body.transform.position - ((EntityState)this).transform.position; float magnitude = ((Vector3)(ref val2)).magnitude; val = ((Vector3)(ref val2)).normalized * magnitude + ((EntityState)this).transform.position; component.Reactivate(); } else if (Object.op_Implicit((Object)(object)target)) { entryLayer = LayerIndex.fakeActor.intVal; Vector3 val3 = target.transform.position - ((EntityState)this).transform.position; float magnitude2 = ((Vector3)(ref val3)).magnitude; val = ((Vector3)(ref val3)).normalized * magnitude2 + ((EntityState)this).transform.position; } Vector3 val4 = val - ((EntityState)this).transform.position; dashSpeed = ((Vector3)(ref val4)).magnitude / dashDuration; dashVector = ((Vector3)(ref val4)).normalized; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, smallHopVelocity); ((EntityState)this).PlayAnimation("FullBody, Override", "AssaulterPrep", "AssaulterPrep.playbackRate", dashDuration); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlay obj = ((Component)modelTransform).gameObject.AddComponent(); obj.duration = dashPrepDuration; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f); obj.destroyComponentOnEnd = true; obj.originalMaterial = SS2Assets.LoadAsset("matNemergize", SS2Bundle.NemMercenary); obj.AddToCharacerModel(characterModel); } if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility.buffIndex); } } private void GatherInputs() { GenericSkill secondary = ((EntityState)this).skillLocator.secondary; if (((ButtonState)(ref ((EntityState)this).inputBank.skill2)).justPressed && secondary.IsReady() && secondary.skillDef.skillNameToken == "SS2_NEMESIS_MERCENARY_SECONDARY_SLASH_NAME") { m2Buffered = true; } } public void CreateDashEffect() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) Transform val = childLocator.FindChild("DashCenter"); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)dashPrefab)) { Object.Instantiate(dashPrefab, val.position, Util.QuaternionSafeLookRotation(dashVector), val); } if (Object.op_Implicit((Object)(object)childLocator)) { ((Component)childLocator.FindChild("PreDashEffect")).gameObject.SetActive(false); } } public override void FixedUpdate() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: 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_0142: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); GatherInputs(); ((EntityState)this).characterDirection.forward = dashVector; float num = dashDuration + dashPrepDuration; if (stopwatch > dashPrepDuration && !isDashing) { isDashing = true; CreateDashEffect(); ((EntityState)this).PlayCrossfade("FullBody, Override", "AssaulterLoop", 0.1f); ((EntityState)this).gameObject.layer = LayerIndex.noCollision.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlay obj = ((Component)modelTransform).gameObject.AddComponent(); obj.duration = 1.2f; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = SS2Assets.LoadAsset("matNemergize", SS2Bundle.NemMercenary); obj.AddToCharacerModel(characterModel); } } if (!isDashing) { ((EntityState)this).characterMotor.velocity = Vector3.zero; stopwatch += Time.fixedDeltaTime; } else if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.velocity = Vector3.zero; if (!inHitPause) { stopwatch += Time.fixedDeltaTime; if (overlapAttack.Fire((List)null)) { if (!hasHit) { hasHit = true; } inHitPause = true; hitPauseTimer = hitPauseDuration / ((BaseState)this).attackSpeedStat; if (m2Buffered) { Util.PlaySound(NemAssaulter.beginSoundString, ((EntityState)this).gameObject); m2Buffered = false; ((EntityState)this).skillLocator.secondary.DeductStock(1); hitPauseTimer += m2HitPauseDuration / ((BaseState)this).attackSpeedStat; inM2HitPause = true; ((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); float num2 = stopwatch + m2ExtraDashDuration - num; if (num2 > 0f) { stopwatch -= num2; } if (Object.op_Implicit((Object)(object)weapon)) { weapon.SetNextState((EntityState)(object)new WhirlwindAssaulter()); } } if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlay obj2 = ((Component)modelTransform).gameObject.AddComponent(); obj2.duration = hitPauseDuration / ((BaseState)this).attackSpeedStat; obj2.animateShaderAlpha = true; obj2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj2.destroyComponentOnEnd = true; obj2.originalMaterial = SS2Assets.LoadAsset("matNemergize", SS2Bundle.NemMercenary); obj2.AddToCharacerModel(((Component)modelTransform).GetComponent()); } } CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += dashVector * dashSpeed * Time.fixedDeltaTime; } else { hitPauseTimer -= Time.fixedDeltaTime; if (hitPauseTimer < 0f) { inM2HitPause = false; inHitPause = false; } } } if (stopwatch >= num && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0041: 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_0050: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).gameObject.layer = entryLayer; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); Util.PlaySound(endSoundString, ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0.1f; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, smallHopVelocity); } AimRequest val = aimRequest; if (val != null) { val.Dispose(); } ((EntityState)this).PlayAnimation("FullBody, Override", "EvisLoopExit", "Special.playbackRate", 1f); if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility.buffIndex); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } public override void OnSerialize(NetworkWriter writer) { writer.Write(target); } public override void OnDeserialize(NetworkReader reader) { target = reader.ReadGameObject(); } } public class FireShotgun : GenericBulletBaseState { public static float selfKnockbackForce = 750f; public override void OnEnter() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_0042: 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) ((GenericBulletBaseState)this).OnEnter(); if (!((BaseState)this).isGrounded && ((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = ((Ray)(ref aimRay)).direction * -1f; ((EntityState)this).characterMotor.ApplyForce(val * selfKnockbackForce, true, false); } } public override void DoFireEffects() { ((GenericBulletBaseState)this).DoFireEffects(); } public override void PlayFireAnimation() { ((GenericBulletBaseState)this).PlayFireAnimation(); ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); ((EntityState)this).PlayAnimation("Gesture, Override", "FireShotgun"); } public override void ModifyBullet(BulletAttack bulletAttack) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) ((GenericBulletBaseState)this).ModifyBullet(bulletAttack); bulletAttack.falloffModel = (FalloffModel)1; DamageAPI.AddModdedDamageType(bulletAttack, RedirectHologram.damageType); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class HologramShadowStep : BaseSkillState { public class CameraLooker : MonoBehaviour, ICameraStateProvider { public Vector3 position; public Vector3 initialLookDirection; public GameObject target; public float startLerpDuration; public static float endLerpDuration = 0.4f; public void StartLook() { foreach (CameraRigController readOnlyInstances in CameraRigController.readOnlyInstancesList) { if (Object.op_Implicit((Object)(object)((Component)this).gameObject) && (Object)(object)readOnlyInstances.target == (Object)(object)((Component)this).gameObject) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)(object)this, startLerpDuration); } else if (readOnlyInstances.IsOverrideCam((ICameraStateProvider)(object)this)) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)null, 0.05f); } } } public void StopLook() { foreach (CameraRigController readOnlyInstances in CameraRigController.readOnlyInstancesList) { if (Object.op_Implicit((Object)(object)((Component)this).gameObject) && (Object)(object)readOnlyInstances.target == (Object)(object)((Component)this).gameObject) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)null, endLerpDuration); } else if (readOnlyInstances.IsOverrideCam((ICameraStateProvider)(object)this)) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)null, 0.05f); } } } public void GetCameraState(CameraRigController cameraRigController, ref CameraState cameraState) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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_004f: 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_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_00cd: 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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) Vector3 value = cameraRigController.targetParams.currentCameraParamsData.idealLocalCameraPos.value; value.y += cameraRigController.targetParams.currentCameraParamsData.pivotVerticalOffset.value + ShadowStep.CameraFlipper.shitNumber; value += (Object.op_Implicit((Object)(object)cameraRigController.targetParams.cameraPivotTransform) ? cameraRigController.targetParams.cameraPivotTransform.localPosition : Vector3.zero); if (Object.op_Implicit((Object)(object)target)) { Vector3 val = target.transform.position - position; Quaternion val2 = (cameraState.rotation = Util.QuaternionSafeLookRotation(((Vector3)(ref val)).normalized)); cameraState.position = position + val2 * value; } else { Quaternion val3 = (cameraState.rotation = Util.QuaternionSafeLookRotation(initialLookDirection)); cameraState.position = position + val3 * value; } } private void OnDestroy() { StopLook(); } public bool IsHudAllowed(CameraRigController cameraRigController) { return true; } public bool IsUserControlAllowed(CameraRigController cameraRigController) { return true; } public bool IsUserLookAllowed(CameraRigController cameraRigController) { return false; } } public static float baseDuration = 0.25f; public static float smallHopVelocity = 12f; public static float cameraLerpTime = 0.5f; private float duration; private Vector3 teleportTarget; public GameObject target; private Vector3 startPosition; private CameraLooker camera; private Vector3 toHologramTarget; private Vector3 lastKnownTargetPosition; private GameObject bossEffect; public override void OnEnter() { //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: 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_015d: 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_0172: 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_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: 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_0096: 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_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound("Play_nemmerc_utility_enter", ((EntityState)this).gameObject); ((BaseState)this).StartAimMode(2f, false); GameObject val = null; duration = baseDuration; if (!Object.op_Implicit((Object)(object)target)) { NemMercTracker component = ((EntityState)this).GetComponent(); target = component.GetTrackingTarget(); } if (Object.op_Implicit((Object)(object)target)) { NemMercHologram component2 = target.GetComponent(); if (Object.op_Implicit((Object)(object)component2) && Object.op_Implicit((Object)(object)component2.target)) { val = ((Component)component2.target).gameObject; toHologramTarget = ((Component)component2.target).transform.position - target.transform.position; } ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator)) { Transform val2 = modelChildLocator.FindChild("Chest"); if (Object.op_Implicit((Object)(object)val2)) { Transform val3 = val2.Find("NemMercenaryBossEffect(Clone)"); if (Object.op_Implicit((Object)(object)val3)) { bossEffect = ((Component)val3).gameObject; bossEffect.SetActive(false); } } } startPosition = ((EntityState)this).transform.position; teleportTarget = target.transform.position; lastKnownTargetPosition = teleportTarget; ((EntityState)this).characterDirection.forward = teleportTarget - ((EntityState)this).transform.position; ((EntityState)this).characterMotor.velocity = Vector3.zero; camera = ((EntityState)this).gameObject.AddComponent(); camera.position = teleportTarget; CameraLooker cameraLooker = camera; Ray aimRay = ((BaseState)this).GetAimRay(); cameraLooker.initialLookDirection = ((Ray)(ref aimRay)).direction; camera.target = val; camera.startLerpDuration = duration * cameraLerpTime; camera.StartLook(); if (Object.op_Implicit((Object)(object)ShadowStep.blinkPrefab)) { EffectManager.SimpleEffect(ShadowStep.blinkPrefab, ((EntityState)this).characterBody.corePosition, Util.QuaternionSafeLookRotation(teleportTarget - ((EntityState)this).transform.position), false); } if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } } else { ((EntityState)this).outer.SetNextStateToMain(); } } private void UpdateTarget() { //IL_0024: 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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_0062: 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) if (Object.op_Implicit((Object)(object)target)) { lastKnownTargetPosition = target.transform.position; } Vector3 val = lastKnownTargetPosition - ((EntityState)this).transform.position; float magnitude = ((Vector3)(ref val)).magnitude; Vector3 normalized = ((Vector3)(ref val)).normalized; teleportTarget = normalized * magnitude + ((EntityState)this).transform.position; } public override void FixedUpdate() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_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_0067: 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_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); UpdateTarget(); ((EntityState)this).characterMotor.velocity = Vector3.zero; if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { if (((Vector3)(ref teleportTarget)).magnitude < 5f) { SS2Log.Error("HOLOGRAMSHADOWSTEP WENT TO 0,0", 135, "FixedUpdate"); SS2Log.Error("TeleportTarget: " + teleportTarget, 136, "FixedUpdate"); SS2Log.Error("target: " + target, 137, "FixedUpdate"); SS2Log.Error("lastKnownTargetPosition: " + lastKnownTargetPosition, 138, "FixedUpdate"); SS2Log.Error("NemMercTrackerComponent target: " + ((EntityState)this).GetComponent().GetTrackingTarget(), 139, "FixedUpdate"); } TeleportHelper.TeleportBody(((EntityState)this).characterBody, teleportTarget); ((EntityState)this).characterDirection.forward = ((toHologramTarget != Vector3.zero) ? toHologramTarget : (startPosition - ((EntityState)this).transform.position)); if (Object.op_Implicit((Object)(object)ShadowStep.blinkArrivalPrefab)) { EffectManager.SimpleEffect(ShadowStep.blinkArrivalPrefab, teleportTarget, Quaternion.identity, true); } ((EntityState)this).outer.SetNextStateToMain(); ((BaseState)this).StartAimMode(2f, false); } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)bossEffect)) { bossEffect.SetActive(true); } if (Object.op_Implicit((Object)(object)camera)) { camera.StopLook(); EntityState.Destroy((Object)(object)camera); } if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } } } public class Lunge : BaseSkillState { public class Riposter : MonoBehaviour, IOnIncomingDamageServerReceiver { public float duration; private float stopwatch; private EntityStateMachine body; private void Awake() { body = EntityStateMachine.FindByCustomName(((Component)this).gameObject, "Body"); if (!Object.op_Implicit((Object)(object)body)) { Object.Destroy((Object)(object)this); } } private void Start() { stopwatch = duration; } private void FixedUpdate() { stopwatch -= Time.fixedDeltaTime; if (stopwatch <= 0f) { Object.Destroy((Object)(object)this); } } public void OnIncomingDamageServer(DamageInfo damageInfo) { if (Object.op_Implicit((Object)(object)damageInfo.attacker) && Object.op_Implicit((Object)(object)body)) { body.SetInterruptState((EntityState)(object)new PrepRetaliate { damageReceived = damageInfo.damage }, (InterruptPriority)2); Object.Destroy((Object)(object)this); } } } public static float maximumDuration = 0.33f; public static float aimVelocity = 4f; public static float minimumY = -0.4f; public static float maximumY = 0.4f; public static float airControl = 0.75f; public static float riposteDuration = 1.5f; public static float collisionRadius = 5f; public float baseSpeed; private float previousAirControl; private Vector3 direction; private EntityStateMachine weapon; private Transform collisionTransform; public override void OnEnter() { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).PlayAnimation("FullBody, Override", "Lunge", "Secondary.playbackRate", 0.3f); Util.PlaySound("Play_nemmerc_secondary_lunge", ((EntityState)this).gameObject); weapon = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Weapon"); collisionTransform = ((BaseState)this).FindModelChild("WhirlwindCollision"); Ray aimRay = ((BaseState)this).GetAimRay(); direction = ((Ray)(ref aimRay)).direction; previousAirControl = ((EntityState)this).characterMotor.airControl; ((EntityState)this).characterMotor.airControl = airControl; if (((EntityState)this).isAuthority) { direction.y = Mathf.Clamp(direction.y, minimumY, maximumY); ((EntityState)this).characterBody.isSprinting = true; ((EntityState)this).characterBody.RecalculateStats(); Vector3 velocity = ((Vector3)(ref direction)).normalized * aimVelocity * ((EntityState)this).characterBody.moveSpeed; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(); ((EntityState)this).characterMotor.velocity = velocity; } CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); } public bool CheckCollisions() { //IL_0014: 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_001b: 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_002a: 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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)collisionTransform)) { Transform obj = collisionTransform; Vector3 position = obj.position; Vector3 val = obj.lossyScale * 0.5f; Quaternion rotation = obj.rotation; Collider[] hits = Physics.OverlapBox(position, val, rotation, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)); return ProcessHits(hits); } return false; } public bool ProcessHits(Collider[] hits) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) foreach (Collider val in hits) { if (!Object.op_Implicit((Object)(object)val)) { continue; } HurtBox component = ((Component)val).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { continue; } HealthComponent healthComponent = component.healthComponent; TeamMask unprotectedTeams = TeamMask.GetUnprotectedTeams(((EntityState)this).characterBody.teamComponent.teamIndex); if (Object.op_Implicit((Object)(object)healthComponent) && healthComponent.alive && ((TeamMask)(ref unprotectedTeams)).HasTeam(healthComponent.body.teamComponent.teamIndex)) { if (NetworkServer.active) { ForceFlinch(healthComponent.body); } return true; } } return false; } protected virtual void ForceFlinch(CharacterBody body) { SetStateOnHurt component = ((Component)body.healthComponent).GetComponent(); if (!((Object)(object)component == (Object)null) && component.canBeHitStunned && !body.isBoss && !body.isChampion) { component.SetPain(); } } public override void FixedUpdate() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterDirection.forward = direction; if (CheckCollisions()) { ((EntityState)this).outer.SetNextStateToMain(); if (Object.op_Implicit((Object)(object)weapon)) { weapon.SetNextState((EntityState)(object)new WhirlwindBase()); } } else if (((EntityState)this).fixedAge >= maximumDuration) { ((EntityState)this).outer.SetNextStateToMain(); if (Object.op_Implicit((Object)(object)weapon)) { weapon.SetNextState((EntityState)(object)new WhirlwindBase()); } } } public override void Update() { //IL_000d: 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) ((EntityState)this).Update(); ((EntityState)this).characterMotor.moveDirection = direction; ((EntityState)this).characterDirection.forward = direction; } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).characterMotor.airControl = previousAirControl; } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class NemAssaulter : BaseState { public bool hasHit; public bool dashVectorLocked; public HurtBox target; private bool m2Buffered; private EntityStateMachine weapon; [NonSerialized] public Transform modelTransform; public static GameObject dashPrefab; public static float smallHopVelocity; public static float m2ExtraDashDuration = 0.1f; public static float m2HitPauseDuration = 0.33f; public static float dashPrepDuration = 0.75f; public static float dashDistance = 35f; public static float dashDuration = 0.2f; public static string beginSoundString; public static string endSoundString; public static float damageCoefficient = 15f; public static float procCoefficient = 1f; public static GameObject hitEffectPrefab; public static float hitPauseDuration = 0.15f; private static float minBehindDistance = 5f; private static float graceDistance = 10f; private float dashSpeed; [NonSerialized] public float stopwatch; [NonSerialized] public Vector3 dashVector = Vector3.zero; [NonSerialized] public Animator animator; [NonSerialized] public CharacterModel characterModel; [NonSerialized] public HurtBoxGroup hurtboxGroup; [NonSerialized] public OverlapAttack overlapAttack; [NonSerialized] public ChildLocator childLocator; [NonSerialized] public bool isDashing; [NonSerialized] public bool inHitPause; [NonSerialized] public bool inM2HitPause; [NonSerialized] public float hitPauseTimer; [NonSerialized] public AimRequest aimRequest; public override void OnEnter() { //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound(beginSoundString, ((EntityState)this).gameObject); modelTransform = ((EntityState)this).GetModelTransform(); weapon = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Weapon"); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { aimRequest = ((EntityState)this).cameraTargetParams.RequestAimType((AimType)2); } if (Object.op_Implicit((Object)(object)modelTransform)) { animator = ((Component)modelTransform).GetComponent(); characterModel = ((Component)modelTransform).GetComponent(); childLocator = ((Component)modelTransform).GetComponent(); hurtboxGroup = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)childLocator)) { ((Component)childLocator.FindChild("PreDashEffect")).gameObject.SetActive(true); } TemporaryOverlay obj = ((Component)modelTransform).gameObject.AddComponent(); obj.duration = dashPrepDuration; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f); obj.destroyComponentOnEnd = true; obj.originalMaterial = SS2Assets.LoadAsset("matNemergize", SS2Bundle.NemMercenary); obj.AddToCharacerModel(characterModel); } float num = dashDistance + minBehindDistance; dashVector = ((EntityState)this).inputBank.aimDirection; if (Object.op_Implicit((Object)(object)target)) { Vector3 val = ((Component)target).transform.position - ((EntityState)this).transform.position; num = Mathf.Min(((Vector3)(ref val)).magnitude + minBehindDistance, num + graceDistance); } ((EntityState)this).characterDirection.forward = ((Vector3)(ref dashVector)).normalized; num = Mathf.Max(num, dashDistance); dashSpeed = num / dashDuration; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, smallHopVelocity); ((EntityState)this).PlayAnimation("FullBody, Override", "AssaulterPrep", "AssaulterPrep.playbackRate", dashPrepDuration); overlapAttack = ((BaseState)this).InitMeleeOverlap(damageCoefficient, hitEffectPrefab, modelTransform, "Assaulter"); overlapAttack.damageType = (DamageType)32; if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility.buffIndex); } } private void GatherInputs() { GenericSkill secondary = ((EntityState)this).skillLocator.secondary; if (((ButtonState)(ref ((EntityState)this).inputBank.skill2)).justPressed && secondary.IsReady() && secondary.skillDef.skillNameToken == "SS2_NEMESIS_MERCENARY_SECONDARY_SLASH_NAME") { m2Buffered = true; } } public void CreateDashEffect() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) Transform val = childLocator.FindChild("DashCenter"); Util.PlaySound("Play_nemmerc_dash", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)dashPrefab)) { Object.Instantiate(dashPrefab, val.position, Util.QuaternionSafeLookRotation(dashVector), val); } if (Object.op_Implicit((Object)(object)childLocator)) { ((Component)childLocator.FindChild("PreDashEffect")).gameObject.SetActive(false); } } public override void FixedUpdate() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); GatherInputs(); float num = dashDuration + dashPrepDuration; ((EntityState)this).characterDirection.forward = dashVector; if (stopwatch > dashPrepDuration && !isDashing) { isDashing = true; dashVector = ((EntityState)this).inputBank.aimDirection; CreateDashEffect(); ((EntityState)this).PlayCrossfade("FullBody, Override", "AssaulterLoop", 0.1f); ((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlay obj = ((Component)modelTransform).gameObject.AddComponent(); obj.duration = 1.2f; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = SS2Assets.LoadAsset("matNemergize", SS2Bundle.NemMercenary); obj.AddToCharacerModel(characterModel); } } if (!isDashing) { ((EntityState)this).characterMotor.velocity = Vector3.zero; stopwatch += Time.fixedDeltaTime; } else if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.velocity = Vector3.zero; if (!inHitPause) { stopwatch += Time.fixedDeltaTime; if (overlapAttack.Fire((List)null)) { if (!hasHit) { hasHit = true; } inHitPause = true; hitPauseTimer = hitPauseDuration / base.attackSpeedStat; if (m2Buffered) { Util.PlaySound(beginSoundString, ((EntityState)this).gameObject); m2Buffered = false; ((EntityState)this).skillLocator.secondary.DeductStock(1); hitPauseTimer += m2HitPauseDuration / base.attackSpeedStat; inM2HitPause = true; float num2 = stopwatch + m2ExtraDashDuration - num; if (num2 > 0f) { stopwatch -= num2; } if (Object.op_Implicit((Object)(object)weapon)) { weapon.SetNextState((EntityState)(object)new WhirlwindAssaulter()); } } if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlay obj2 = ((Component)modelTransform).gameObject.AddComponent(); obj2.duration = hitPauseDuration / base.attackSpeedStat; obj2.animateShaderAlpha = true; obj2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj2.destroyComponentOnEnd = true; obj2.originalMaterial = LegacyResourcesAPI.Load("Materials/matMercEvisTarget"); obj2.AddToCharacerModel(characterModel); } } CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += dashVector * dashSpeed * Time.fixedDeltaTime; } else { if (inM2HitPause) { dashVector = ((EntityState)this).inputBank.aimDirection; } hitPauseTimer -= Time.fixedDeltaTime; if (hitPauseTimer < 0f) { inM2HitPause = false; inHitPause = false; } } } if (stopwatch >= num && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0045: 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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); Util.PlaySound(endSoundString, ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0.1f; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, smallHopVelocity); } AimRequest val = aimRequest; if (val != null) { val.Dispose(); } if (Object.op_Implicit((Object)(object)childLocator)) { ((Component)childLocator.FindChild("PreDashEffect")).gameObject.SetActive(false); } ((EntityState)this).PlayAnimation("FullBody, Override", "EvisLoopExit", "Special.playbackRate", 1f); if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility.buffIndex); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } public override void OnSerialize(NetworkWriter writer) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) NetworkExtensions.Write(writer, HurtBoxReference.FromHurtBox(target)); } public override void OnDeserialize(NetworkReader reader) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) HurtBoxReference val = NetworkExtensions.ReadHurtBoxReference(reader); target = ((HurtBoxReference)(ref val)).ResolveHurtBox(); } } public class PrepRetaliate : BaseSkillState { public static float baseDuration = 0.33f; private float duration; public float damageReceived; private EntityStateMachine weapon; public override void OnEnter() { ((BaseState)this).OnEnter(); Util.PlaySound("Play_commando_M2_grenade_throw", ((EntityState)this).gameObject); duration = baseDuration / ((BaseState)this).attackSpeedStat; weapon = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Weapon"); } public override void FixedUpdate() { //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) ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); if (Object.op_Implicit((Object)(object)weapon)) { weapon.SetInterruptState((EntityState)(object)new Retaliate(), (InterruptPriority)2); } } } } public class PullKnife : BaseState { public static float smallHopVelocity = 8f; public static float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, smallHopVelocity); } ((EntityState)this).outer.SetNextStateToMain(); } } public class Reload : BaseState { public static float baseDuration = 1f; public static string reloadSoundString; public float reloadTime = 0.5f; private float duration; private bool hasReloaded; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).PlayCrossfade("Gesture, Override", "Reload2", "Reload.playbackRate", duration * 0.9f, 0.1f); Util.PlaySound(reloadSoundString, ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration * reloadTime && !hasReloaded) { hasReloaded = true; AddStock(); } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void AddStock() { ((EntityState)this).skillLocator.primary.stock = 2; } public override InterruptPriority GetMinimumInterruptPriority() { if (hasReloaded) { return (InterruptPriority)0; } return (InterruptPriority)1; } } public class Retaliate : WhirlwindBase { } public class Scan : BaseSkillState { public static float scanRadius = 75f; public static float randomHologramRadius = 40f; public static float scanDuration = 1f; public static float hologramDuration = 10f; [SerializeField] public int targetedHolograms = 3; public static float targetedHologramOffset = 8f; [SerializeField] public int randomHolograms = 1; public static float maxHologramYOffsetInsideUnitSphereIdk = 0.25f; public static float minimumRandomHologramDistance = 25f; public static GameObject hologramPrefab; public static GameObject scanEffect; public static string soundString; public override void OnEnter() { //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Expected O, but got Unknown //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: 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) ((BaseState)this).OnEnter(); if (NetworkServer.active) { SpawnHolograms(); } Transform modelTransform = ((EntityState)this).GetModelTransform(); TemporaryOverlay obj = ((Component)modelTransform).gameObject.AddComponent(); obj.duration = hologramDuration; obj.alphaCurve = AnimationCurve.Constant(0f, 1f, 1f); obj.animateShaderAlpha = true; obj.destroyComponentOnEnd = true; obj.originalMaterial = SS2Assets.LoadAsset("matNemMercGlow", SS2Bundle.NemMercenary); obj.AddToCharacerModel(((Component)modelTransform).GetComponent()); ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator)) { Transform val = modelChildLocator.FindChild("GasL"); if (Object.op_Implicit((Object)(object)val)) { ParticleSystem component = ((Component)val).GetComponent(); MainModule main = component.main; ((MainModule)(ref main)).duration = hologramDuration; component.Play(); } Transform val2 = modelChildLocator.FindChild("GasR"); if (Object.op_Implicit((Object)(object)val2)) { ParticleSystem component2 = ((Component)val2).GetComponent(); MainModule main2 = component2.main; ((MainModule)(ref main2)).duration = hologramDuration; component2.Play(); } } EffectManager.SpawnEffect(scanEffect, new EffectData { origin = ((EntityState)this).transform.position, scale = scanRadius }, false); ((EntityState)this).outer.SetNextStateToMain(); Util.PlaySound(soundString, ((EntityState)this).gameObject); } private void SpawnHolograms() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: 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_00ff: 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_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: 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_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); TeamMask allButNeutral = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral)).RemoveTeam(((EntityState)this).teamComponent.teamIndex); BullseyeSearch val = new BullseyeSearch { teamMaskFilter = allButNeutral, filterByLoS = false, searchOrigin = ((Ray)(ref aimRay)).origin, searchDirection = ((Ray)(ref aimRay)).direction, sortMode = (SortMode)2, maxDistanceFilter = scanRadius, maxAngleFilter = 120f }; val.RefreshCandidates(); val.FilterOutGameObject(((EntityState)this).gameObject); List list = val.GetResults().ToList(); int num = Mathf.Min(targetedHolograms, list.Count); Vector3 val3 = default(Vector3); RaycastHit val4 = default(RaycastHit); for (int i = 0; i < num; i++) { HurtBox val2; if (i == 0) { val2 = list.FirstOrDefault(); list.RemoveAt(0); } else { int index = Random.Range(0, list.Count - 1); val2 = list[index]; list.RemoveAt(index); } Vector2 insideUnitCircle = Random.insideUnitCircle; ((Vector3)(ref val3))..ctor(insideUnitCircle.x, 0f, insideUnitCircle.y); Vector3 position = ((Component)val2).transform.position + val3 * targetedHologramOffset; if (Physics.Raycast(((Component)val2).transform.position, val3, ref val4, targetedHologramOffset, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { position = ((RaycastHit)(ref val4)).point; } SpawnHologramSingle(position, val2); } Vector3 position2 = default(Vector3); for (int j = 0; j < randomHolograms; j++) { NodeGraph groundNodes = SceneInfo.instance.groundNodes; NodeGraph airNodes = SceneInfo.instance.airNodes; List list2 = groundNodes.FindNodesInRange(((EntityState)this).transform.position, minimumRandomHologramDistance, randomHologramRadius, (HullMask)1); float num2 = list2.Count; List list3 = airNodes.FindNodesInRange(((EntityState)this).transform.position, minimumRandomHologramDistance, randomHologramRadius, (HullMask)1); float num3 = list3.Count; if (Random.Range(0f, num2 + num3) > num2) { int index2 = Random.Range(0, list3.Count - 1); airNodes.GetNodePosition(list3[index2], ref position2); } else { int index3 = Random.Range(0, list2.Count - 1); groundNodes.GetNodePosition(list2[index3], ref position2); position2.y += 4f; } SpawnHologramSingle(position2, null); } } private void SpawnHologramSingle(Vector3 position, HurtBox target) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) NemMercHologram component = Object.Instantiate(hologramPrefab, position, Quaternion.identity).GetComponent(); component.lifetime = hologramDuration; component.owner = ((EntityState)this).gameObject; component.target = target; NetworkServer.Spawn(((Component)component).gameObject); } } public class ScanScepter : Scan { } public class SpawnCloneScepter : SpawnClone { } public class ShadowStep : BaseSkillState { public class CameraFlipper : MonoBehaviour, ICameraStateProvider { public static bool userLook = false; public static bool userControl = false; public static bool doOffset = true; public static float maxOffset = 12f; public static float endLerpDuration = 0.5f; public static float wallCushion = 0.1f; public static float shitNumber = 0.9f; public AnimationCurve movementCurve; public AnimationCurve fovCurve; private Vector3 cameraStartPosition; public Vector3 cameraEndPosition; private Vector3 cameraPivot; private Vector3 orbitDirection; private GameObject target; private float orbitDistance; public bool inOverride; private float overrideStopwatch; private float overrideDuration; public void UpdateCamera(float dt) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) overrideStopwatch += dt; if (Object.op_Implicit((Object)(object)target)) { cameraPivot = target.transform.position; } } private float EvaluateOffsetCurve(float f) { return 0f - Mathf.Pow(f - 1f, 2f) + 1f; } public void StartCameraFlip(Vector3 endPoint, GameObject target, float duration) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_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_009f: 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_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: 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_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) //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_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: 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_011d: 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) foreach (CameraRigController readOnlyInstances in CameraRigController.readOnlyInstancesList) { if ((Object)(object)readOnlyInstances.target == (Object)(object)((Component)this).gameObject) { cameraStartPosition = readOnlyInstances.currentCameraState.position; readOnlyInstances.SetOverrideCam((ICameraStateProvider)(object)this, 0.25f); } else if (readOnlyInstances.IsOverrideCam((ICameraStateProvider)(object)this)) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)null, 0.05f); } } inOverride = true; overrideStopwatch = 0f; overrideDuration = duration; Vector3 val = endPoint - ((Component)this).transform.position; Vector3 val2 = new Vector3(val.x, 0f, val.z); Vector3 normalized = ((Vector3)(ref val2)).normalized; Vector3 val3 = Quaternion.Euler(0f, -90f, 0f) * normalized; this.target = target; cameraPivot = this.target.transform.position; orbitDirection = val3; orbitDistance = Mathf.Min(((Vector3)(ref val)).magnitude / 2f, maxOffset); cameraEndPosition = endPoint; } public void EndCameraFlip() { inOverride = false; foreach (CameraRigController readOnlyInstances in CameraRigController.readOnlyInstancesList) { if ((Object)(object)readOnlyInstances.target == (Object)(object)((Component)this).gameObject) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)null, endLerpDuration); } else if (readOnlyInstances.IsOverrideCam((ICameraStateProvider)(object)this)) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)null, 0.05f); } } } public void GetCameraState(CameraRigController cameraRigController, ref CameraState cameraState) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: 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_0076: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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_00c3: 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_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: 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_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: 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_010e: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: 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_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: 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_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015f: 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_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0175: 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) float num = movementCurve.Evaluate(Mathf.Clamp01(overrideStopwatch / overrideDuration)); Vector3 val = (Object.op_Implicit((Object)(object)target) ? target.transform.position : cameraPivot); Vector3 val2 = EvaluateOffsetCurve(num * 2f) * orbitDistance * orbitDirection; Vector3 val3 = Vector3.Lerp(cameraStartPosition, cameraEndPosition, num) + val2; Vector3 val4 = val - val3; Vector3 value = cameraRigController.targetParams.currentCameraParamsData.idealLocalCameraPos.value; value.y += cameraRigController.targetParams.currentCameraParamsData.pivotVerticalOffset.value + shitNumber; value += (Object.op_Implicit((Object)(object)cameraRigController.targetParams.cameraPivotTransform) ? cameraRigController.targetParams.cameraPivotTransform.localPosition : Vector3.zero); val3 += Util.QuaternionSafeLookRotation(((Vector3)(ref val4)).normalized) * value; Vector3 val5 = val - val3; Quaternion rotation = Util.QuaternionSafeLookRotation(((Vector3)(ref val5)).normalized); Vector3 val6 = val3 - val; float num2 = Raycast(new Ray(val, ((Vector3)(ref val6)).normalized), ((Vector3)(ref val6)).magnitude, wallCushion - 0.01f); Vector3 position = ((Vector3)(ref val6)).normalized * num2 + val; cameraState.position = position; cameraState.rotation = rotation; } public float Raycast(Ray ray, float maxDistance, float wallCushion) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) LayerIndex world = LayerIndex.world; RaycastHit[] array = Physics.SphereCastAll(ray, wallCushion, maxDistance, LayerMask.op_Implicit(((LayerIndex)(ref world)).mask), (QueryTriggerInteraction)1); float num = maxDistance; for (int i = 0; i < array.Length; i++) { float distance = ((RaycastHit)(ref array[i])).distance; if (distance < num) { Collider collider = ((RaycastHit)(ref array[i])).collider; if (Object.op_Implicit((Object)(object)collider) && !Object.op_Implicit((Object)(object)((Component)collider).GetComponent())) { num = distance; } } } return num; } public float GetPitchFromLookVector(Vector3 lookVector) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: 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_0013: 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) float num = Mathf.Sqrt(lookVector.x * lookVector.x + lookVector.z * lookVector.z); return Mathf.Atan2(0f - lookVector.y, num) * 57.29578f; } public bool IsHudAllowed(CameraRigController cameraRigController) { return true; } public bool IsUserControlAllowed(CameraRigController cameraRigController) { return true; } public bool IsUserLookAllowed(CameraRigController cameraRigController) { return true; } } public static float teleportYBonus = 1.25f; public static float baseDuration = 0.5f; public static float teleportBehindDistance = 5f; public static float teleportTime = 0.75f; public static float smallHopVelocity = 12f; public static float hologramDurationCoefficient = 0.5f; public static AnimationCurve cameraMovementCurve; public static GameObject blinkPrefab; public static GameObject blinkDestinationPrefab; public static GameObject blinkArrivalPrefab; private GameObject destinationInstance; private float duration; private Vector3 teleportStartPosition; private Vector3 teleportTarget; private CameraFlipper camera; private GameObject target; private CharacterModel characterModel; private Transform modelTransform; private Vector3 lastKnownTargetPosition; private Vector3 targetSafe; private GameObject bossEffect; [NonSerialized] public static bool FUCKERTESTINGXDDDDDDDDDDDDDDDDDDDDD = true; private bool s; [NonSerialized] public static float bitch = 0.66f; public override void OnEnter() { //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_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: 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_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration; NemMercTracker component = ((EntityState)this).GetComponent(); target = component.GetTrackingTarget(); if (!Object.op_Implicit((Object)(object)target)) { ((EntityState)this).outer.SetNextStateToMain(); ((BaseSkillState)this).activatorSkillSlot.AddOneStock(); return; } ((BaseState)this).StartAimMode(2f, false); ((EntityState)this).PlayAnimation("FullBody, Override", "ShadowStep", "Utility.playbackRate", baseDuration); Util.PlaySound("Play_nemmerc_utility_enter", ((EntityState)this).gameObject); teleportStartPosition = ((EntityState)this).transform.position; UpdateTarget(); lastKnownTargetPosition = target.transform.position; ((EntityState)this).characterDirection.forward = teleportTarget - ((EntityState)this).transform.position; camera = ((EntityState)this).gameObject.AddComponent(); camera.StartCameraFlip(teleportTarget, target, duration * teleportTime); camera.movementCurve = cameraMovementCurve; ((EntityState)this).characterMotor.velocity = Vector3.zero; modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { characterModel = ((Component)modelTransform).GetComponent(); ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator)) { Transform val = modelChildLocator.FindChild("Chest"); if (Object.op_Implicit((Object)(object)val)) { Transform val2 = val.Find("NemMercenaryBossEffect(Clone)"); if (Object.op_Implicit((Object)(object)val2)) { bossEffect = ((Component)val2).gameObject; bossEffect.SetActive(false); } } } } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; obj.invisibilityCount++; } if (Object.op_Implicit((Object)(object)blinkPrefab)) { EffectManager.SimpleEffect(blinkPrefab, ((EntityState)this).characterBody.corePosition, Util.QuaternionSafeLookRotation(teleportTarget - teleportStartPosition), false); } if (Object.op_Implicit((Object)(object)blinkDestinationPrefab)) { destinationInstance = Object.Instantiate(blinkDestinationPrefab, teleportTarget, Quaternion.identity); } if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } } private void UpdateTarget() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0034: 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) //IL_0044: 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_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: 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) if (Object.op_Implicit((Object)(object)target)) { lastKnownTargetPosition = target.transform.position; } Vector3 val = lastKnownTargetPosition - teleportStartPosition; float magnitude = ((Vector3)(ref val)).magnitude; Vector3 normalized = ((Vector3)(ref val)).normalized; teleportTarget = normalized * (magnitude + teleportBehindDistance) + ((EntityState)this).transform.position; RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(lastKnownTargetPosition, normalized, ref val2, teleportBehindDistance, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { teleportTarget = ((RaycastHit)(ref val2)).point; } teleportTarget.y = Mathf.Max(lastKnownTargetPosition.y + teleportYBonus, teleportTarget.y); if (Object.op_Implicit((Object)(object)camera)) { camera.cameraEndPosition = teleportTarget; } if (Object.op_Implicit((Object)(object)destinationInstance)) { destinationInstance.transform.position = teleportTarget; } } private void FixedUpdateTarget() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)target)) { targetSafe = teleportTarget; } } public override void FixedUpdate() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0163: 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_00d7: 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_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: 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_0184: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); FixedUpdateTarget(); ((EntityState)this).characterMotor.velocity = Vector3.zero; if (((EntityState)this).fixedAge >= duration * bitch && !s) { s = true; Util.PlaySound("Play_nemmerc_utility_exit", ((EntityState)this).gameObject); } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { if (Object.op_Implicit((Object)(object)camera)) { camera.EndCameraFlip(); } if (((Vector3)(ref targetSafe)).magnitude < 5f) { SS2Log.Error("SHADOWSTEP WENT TO 0,0", 174, "FixedUpdate"); SS2Log.Error("TeleportTarget: " + teleportTarget, 175, "FixedUpdate"); SS2Log.Error("targetSafe: " + targetSafe, 176, "FixedUpdate"); SS2Log.Error("target: " + target, 177, "FixedUpdate"); SS2Log.Error("lastKnownTargetPosition: " + lastKnownTargetPosition, 178, "FixedUpdate"); SS2Log.Error("NemMercTrackerComponent target: " + ((EntityState)this).GetComponent().GetTrackingTarget(), 179, "FixedUpdate"); } TeleportHelper.TeleportBody(((EntityState)this).characterBody, targetSafe); if (Object.op_Implicit((Object)(object)blinkArrivalPrefab)) { EffectManager.SimpleEffect(blinkArrivalPrefab, targetSafe, Quaternion.identity, true); } ((EntityState)this).characterDirection.forward = lastKnownTargetPosition - ((EntityState)this).transform.position; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, smallHopVelocity); ((BaseState)this).StartAimMode(2f, false); ((EntityState)this).outer.SetNextStateToMain(); } } public override void Update() { ((EntityState)this).Update(); UpdateTarget(); if (Object.op_Implicit((Object)(object)camera)) { camera.UpdateCamera(Time.deltaTime); } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)bossEffect)) { bossEffect.SetActive(true); } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; obj.invisibilityCount--; } if (Object.op_Implicit((Object)(object)camera)) { camera.EndCameraFlip(); EntityState.Destroy((Object)(object)camera); } if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlay obj2 = ((Component)modelTransform).gameObject.AddComponent(); obj2.duration = 0.67f; obj2.animateShaderAlpha = true; obj2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj2.destroyComponentOnEnd = true; obj2.originalMaterial = SS2Assets.LoadAsset("matNemergize", SS2Bundle.NemMercenary); obj2.AddToCharacerModel(((Component)modelTransform).GetComponent()); } ((EntityState)this).characterMotor.useGravity = true; if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } } } public class Slide : BaseSkillState { public static AnimationCurve forwardSpeedCurve; public static float forwardSpeedCurveCoefficient = 5f; public static float baseExtraForwardSpeed = 0f; public static float baseDuration = 1.5f; public static float minDuration = 0.5f; public static float maxTurnSpeed = 720f; public static float minTurnSpeed = 180f; public static float smoothTime = 0.1f; public static float airFrictionCoefficient = 0.4f; public static float movespeedScalingCoefficient = 0.67f; private Vector3 targetMoveVectorVelocity; private Vector3 forwardDirection; private GameObject slideEffectInstance; private bool m2Buffered; private NemMercTracker tracker; private float stopwatch; private EntityStateMachine body; private bool isClone; public override void OnEnter() { //IL_00c1: 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_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: 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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).PlayAnimation("Body", "SlideStart"); ((EntityState)this).GetModelAnimator().SetFloat("inSlideState", 1f); Util.PlaySound(SlideState.soundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)SlideState.slideEffectPrefab)) { Transform transform = ((EntityState)this).characterBody.transform; slideEffectInstance = Object.Instantiate(SlideState.slideEffectPrefab, transform); } body = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Body"); tracker = ((EntityState)this).GetComponent(); isClone = tracker is NemMercCloneTracker; if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { CharacterDirection characterDirection = ((EntityState)this).characterDirection; Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).inputBank.aimDirection : ((EntityState)this).inputBank.moveVector); characterDirection.forward = ((Vector3)(ref val)).normalized; forwardDirection = ((EntityState)this).characterDirection.forward; ((EntityState)this).characterDirection.moveVector = forwardDirection; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity.y = Mathf.Max(0f, ((EntityState)this).characterMotor.velocity.y); } ((EntityState)this).characterBody.SetSpreadBloom(0f, false); } private void GatherInputs() { GenericSkill secondary = ((EntityState)this).skillLocator.secondary; if (((ButtonState)(ref ((EntityState)this).inputBank.skill2)).justPressed && secondary.IsReady() && secondary.skillDef.skillNameToken == "SS2_NEMESIS_MERCENARY_SECONDARY_SLASH_NAME") { m2Buffered = true; } } public override void FixedUpdate() { //IL_00aa: 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_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018b: 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_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011c: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!((EntityState)this).isAuthority) { return; } bool flag = !Object.op_Implicit((Object)(object)body) || (Object.op_Implicit((Object)(object)body) && body.IsInMainState()); float num = ((((BaseState)this).isGrounded && flag) ? Time.fixedDeltaTime : (Time.fixedDeltaTime * airFrictionCoefficient)); stopwatch += num; float num2 = Mathf.Clamp01(stopwatch / baseDuration); float num3 = Mathf.Lerp(maxTurnSpeed, minTurnSpeed, num2); float num4 = forwardSpeedCurve.Evaluate(num2) * forwardSpeedCurveCoefficient + baseExtraForwardSpeed; ((EntityState)this).characterMotor.moveDirection = Vector3.zero; if (((BaseState)this).isGrounded) { Vector3 val = ((((EntityState)this).inputBank.moveVector != Vector3.zero) ? ((EntityState)this).inputBank.moveVector : ((EntityState)this).characterDirection.forward); Vector3 val2 = Vector3.ProjectOnPlane(Vector3.SmoothDamp(forwardDirection, val, ref targetMoveVectorVelocity, smoothTime, num3), Vector3.up); Vector3 moveVector = (forwardDirection = ((Vector3)(ref val2)).normalized); ((EntityState)this).characterDirection.moveVector = moveVector; } float num5 = ((EntityState)this).characterBody.moveSpeed / ((EntityState)this).characterBody.baseMoveSpeed; num5 *= movespeedScalingCoefficient; if (flag && !isClone) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += ((EntityState)this).characterBody.moveSpeed * num5 * num4 * forwardDirection * Time.fixedDeltaTime; } if (!((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= minDuration && flag) { if (Object.op_Implicit((Object)(object)tracker)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new TargetDash { m2Buffered = m2Buffered, target = tracker.GetTrackingTarget() }); } else { ((EntityState)this).outer.SetNextStateToMain(); } } } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).PlayAnimation("Body", "SlideEnd"); ((EntityState)this).GetModelAnimator().SetFloat("inSlideState", 0f); if (Object.op_Implicit((Object)(object)slideEffectInstance)) { EntityState.Destroy((Object)(object)slideEffectInstance); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class SpawnClone : BaseSkillState { public static float cloneLifetime = 12f; public static float targetedHologramOffset = 8f; public static GameObject hologramPrefab; public static GameObject scanEffect; public static float maxRange = 50f; public static bool copyInventory; [SerializeField] public int numRecasts = 1; private NemMercTracker tracker; private uint primary; private uint secondary; private uint utility; private uint special; private static List illegalItems = new List { Items.ExtraLife, Items.ExtraLifeVoid, Items.RoboBallBuddy, Items.BeetleGland, Items.FocusConvergence, Items.TPHealingNova, Items.Squid, Items.TitanGoldDuringTP, Items.DroneWeapons, Items.FreeChest, Items.VoidMegaCrabItem, Items.TreasureCache, Items.TreasureCacheVoid, SS2Content.Items.RelicOfTermination, SS2Content.Items.NkotasHeritage, SS2Content.Items.Remuneration }; public override void OnEnter() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_005a: 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_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Expected O, but got Unknown ((BaseState)this).OnEnter(); tracker = ((EntityState)this).GetComponent(); primary = ((EntityState)this).characterBody.master.loadout.bodyLoadoutManager.GetSkillVariant(((EntityState)this).characterBody.bodyIndex, 0); secondary = ((EntityState)this).characterBody.master.loadout.bodyLoadoutManager.GetSkillVariant(((EntityState)this).characterBody.bodyIndex, 1); utility = ((EntityState)this).characterBody.master.loadout.bodyLoadoutManager.GetSkillVariant(((EntityState)this).characterBody.bodyIndex, 2); special = ((EntityState)this).characterBody.master.loadout.bodyLoadoutManager.GetSkillVariant(((EntityState)this).characterBody.bodyIndex, 3); SpawnHolograms(); Util.PlaySound("Play_nemmerc_clone_spawn", ((EntityState)this).gameObject); EffectManager.SpawnEffect(scanEffect, new EffectData { origin = ((EntityState)this).transform.position, scale = 60f }, false); ((EntityState)this).outer.SetNextStateToMain(); } private void SpawnHolograms() { //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_010b: 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_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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_00a1: 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) if (!NetworkServer.active) { return; } if (Object.op_Implicit((Object)(object)tracker)) { GameObject trackingTarget = tracker.GetTrackingTarget(); if (Object.op_Implicit((Object)(object)trackingTarget)) { Vector3 val = trackingTarget.transform.position - ((EntityState)this).transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; Vector3 position = trackingTarget.transform.position + normalized * targetedHologramOffset; RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(trackingTarget.transform.position, normalized, ref val2, targetedHologramOffset, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { position = ((RaycastHit)(ref val2)).point; } SpawnHologramSingle(position); return; } } Vector3 position2 = ((EntityState)this).inputBank.aimDirection * maxRange + ((EntityState)this).inputBank.aimOrigin; RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(((EntityState)this).inputBank.aimOrigin, ((EntityState)this).inputBank.aimDirection, ref val3, maxRange, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { position2 = ((RaycastHit)(ref val3)).point; } SpawnHologramSingle(position2); } public static bool ItemFilter(ItemIndex itemIndex) { //IL_0000: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) ItemDef itemDef = ItemCatalog.GetItemDef(itemIndex); if (((Object)itemDef).name == "ITEM_ANCIENT_SCEPTER" || itemDef.nameToken == "ITEM_ANCIENT_SCEPTER_NAME") { return false; } if (ItemCatalog.GetItemDef(itemIndex).ContainsTag((ItemTag)13)) { return false; } foreach (ItemDef illegalItem in illegalItems) { if (illegalItem.itemIndex == itemIndex) { return false; } } return true; } private void SpawnHologramSingle(Vector3 position) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0045: 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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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) //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_00a5: 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_00b8: 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) CharacterMaster component = hologramPrefab.GetComponent(); Loadout val = new Loadout(); component.loadout.Copy(val); BodyIndex bodyIndex = component.bodyPrefab.GetComponent().bodyIndex; val.bodyLoadoutManager.SetSkillVariant(bodyIndex, 0, primary); val.bodyLoadoutManager.SetSkillVariant(bodyIndex, 1, secondary); val.bodyLoadoutManager.SetSkillVariant(bodyIndex, 2, utility); val.bodyLoadoutManager.SetSkillVariant(bodyIndex, 3, special); CloneInputBank component2 = ((Component)new MasterSummon { masterPrefab = hologramPrefab, position = position, rotation = ((EntityState)this).characterBody.transform.rotation, inventoryToCopy = null, summonerBodyObject = ((EntityState)this).gameObject, loadout = val, preSpawnSetupCallback = delegate(CharacterMaster master) { ((Component)master).gameObject.AddComponent().lifeTimer = cloneLifetime; master.inventory.itemAcquisitionOrder.Clear(); int[] itemStacks = master.inventory.itemStacks; int num = 0; ArrayUtils.SetAll(itemStacks, ref num); master.inventory.AddItemsFrom(((EntityState)this).characterBody.inventory, (Func)ItemFilter); master.inventory.CopyEquipmentFrom(((EntityState)this).characterBody.inventory); master.onBodyStart += delegate(CharacterBody body) { ((Component)body).GetComponent().ownerTracker = tracker; StupidFuckingCooldownSetter stupidFuckingCooldownSetter = ((Component)body).gameObject.AddComponent(); stupidFuckingCooldownSetter.primaryStock = ((EntityState)this).skillLocator.primary.stock; stupidFuckingCooldownSetter.primaryStopwatch = ((EntityState)this).skillLocator.primary.rechargeStopwatch; stupidFuckingCooldownSetter.secondaryStock = ((EntityState)this).skillLocator.secondary.stock; stupidFuckingCooldownSetter.secondaryStopwatch = ((EntityState)this).skillLocator.secondary.rechargeStopwatch; stupidFuckingCooldownSetter.utilityStock = ((EntityState)this).skillLocator.utility.stock; stupidFuckingCooldownSetter.utilityStopwatch = ((EntityState)this).skillLocator.utility.rechargeStopwatch; stupidFuckingCooldownSetter.specialStock = ((EntityState)this).skillLocator.special.stock; stupidFuckingCooldownSetter.specialStopwatch = ((EntityState)this).skillLocator.special.rechargeStopwatch; }; } }.Perform()).GetComponent(); component2.NetworkownerMasterObject = ((Component)((EntityState)this).characterBody.master).gameObject; component2.maxRecasts = numRecasts; } } public class TargetDash : BaseSkillState { public bool hasHit; public bool dashVectorLocked; public GameObject target; public bool m2Buffered; private EntityStateMachine weapon; private int entryLayer; [NonSerialized] public Transform modelTransform; public static GameObject dashPrefab; public static float smallHopVelocity; public static float m2HitPauseDuration = 0.33f; public static float dashDuration = 0.2f; public static float baseDashDistance = 20f; public static float dashBehindDistance = 5f; public static string beginSoundString; public static string endSoundString; public static float damageCoefficient = 3f; public static float procCoefficient = 1f; public static GameObject hitEffectPrefab; public static float hitPauseDuration = 0.15f; private float dashSpeed; [NonSerialized] public float stopwatch; [NonSerialized] public Vector3 dashVector = Vector3.zero; [NonSerialized] public Animator animator; [NonSerialized] public CharacterModel characterModel; [NonSerialized] public HurtBoxGroup hurtboxGroup; [NonSerialized] public OverlapAttack overlapAttack; [NonSerialized] public ChildLocator childLocator; [NonSerialized] public bool inHitPause; [NonSerialized] public bool inM2HitPause; [NonSerialized] public float hitPauseTimer; [NonSerialized] public AimRequest aimRequest; public override void OnEnter() { //IL_00d2: 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_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_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_013e: 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_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound(beginSoundString, ((EntityState)this).gameObject); modelTransform = ((EntityState)this).GetModelTransform(); weapon = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Weapon"); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { aimRequest = ((EntityState)this).cameraTargetParams.RequestAimType((AimType)2); } if (Object.op_Implicit((Object)(object)modelTransform)) { animator = ((Component)modelTransform).GetComponent(); characterModel = ((Component)modelTransform).GetComponent(); childLocator = ((Component)modelTransform).GetComponent(); hurtboxGroup = ((Component)modelTransform).GetComponent(); } overlapAttack = ((BaseState)this).InitMeleeOverlap(damageCoefficient, hitEffectPrefab, modelTransform, "Assaulter"); overlapAttack.damageType = (DamageType)32; DamageAPI.AddModdedDamageType(overlapAttack, RedirectHologram.damageType); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = ((Ray)(ref aimRay)).GetPoint(baseDashDistance); if (Object.op_Implicit((Object)(object)target)) { Vector3 val2 = target.transform.position - ((EntityState)this).transform.position; float magnitude = ((Vector3)(ref val2)).magnitude; Vector3 normalized = ((Vector3)(ref val2)).normalized; val = normalized * (magnitude + dashBehindDistance) + ((EntityState)this).transform.position; RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(target.transform.position, normalized, ref val3, dashBehindDistance, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { val = ((RaycastHit)(ref val3)).point; } } Vector3 val4 = val - ((EntityState)this).transform.position; dashSpeed = ((Vector3)(ref val4)).magnitude / dashDuration; dashVector = ((Vector3)(ref val4)).normalized; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, smallHopVelocity); CreateDashEffect(); ((EntityState)this).PlayCrossfade("FullBody, Override", "AssaulterLoop", 0.1f); entryLayer = ((EntityState)this).gameObject.layer; ((EntityState)this).gameObject.layer = (Object.op_Implicit((Object)(object)target) ? LayerIndex.noCollision.intVal : LayerIndex.debris.intVal); ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlay obj = ((Component)modelTransform).gameObject.AddComponent(); obj.duration = 1.2f; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = SS2Assets.LoadAsset("matNemergize", SS2Bundle.NemMercenary); obj.AddToCharacerModel(((Component)modelTransform).GetComponent()); } if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility.buffIndex); } } private void GatherInputs() { GenericSkill secondary = ((EntityState)this).skillLocator.secondary; if (((ButtonState)(ref ((EntityState)this).inputBank.skill2)).justPressed && secondary.IsReady() && secondary.skillDef.skillNameToken == "SS2_NEMESIS_MERCENARY_SECONDARY_SLASH_NAME") { m2Buffered = true; } } public void CreateDashEffect() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) Transform val = childLocator.FindChild("DashCenter"); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)dashPrefab)) { Object.Instantiate(dashPrefab, val.position, Util.QuaternionSafeLookRotation(dashVector), val); } } public override void FixedUpdate() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); GatherInputs(); ((EntityState)this).characterDirection.forward = dashVector; if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.velocity = Vector3.zero; if (!inHitPause) { stopwatch += Time.fixedDeltaTime; if (overlapAttack.Fire((List)null)) { if (!hasHit) { hasHit = true; } inHitPause = true; hitPauseTimer = hitPauseDuration / ((BaseState)this).attackSpeedStat; if (m2Buffered) { m2Buffered = false; ((EntityState)this).skillLocator.secondary.DeductStock(1); hitPauseTimer += m2HitPauseDuration / ((BaseState)this).attackSpeedStat; inM2HitPause = true; ((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); if (Object.op_Implicit((Object)(object)weapon)) { weapon.SetNextState((EntityState)(object)new WhirlwindAssaulter()); } } if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlay obj = ((Component)modelTransform).gameObject.AddComponent(); obj.duration = hitPauseDuration / ((BaseState)this).attackSpeedStat; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = SS2Assets.LoadAsset("matNemergize", SS2Bundle.NemMercenary); obj.AddToCharacerModel(((Component)modelTransform).GetComponent()); } } CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += dashVector * dashSpeed * Time.fixedDeltaTime; } else { hitPauseTimer -= Time.fixedDeltaTime; if (hitPauseTimer < 0f) { inM2HitPause = false; inHitPause = false; } } } if (stopwatch >= dashDuration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0041: 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_0050: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).gameObject.layer = entryLayer; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); Util.PlaySound(endSoundString, ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0.1f; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, smallHopVelocity); } AimRequest val = aimRequest; if (val != null) { val.Dispose(); } ((EntityState)this).PlayAnimation("FullBody, Override", "EvisLoopExit", "Special.playbackRate", 1f); if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility.buffIndex); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } public override void OnSerialize(NetworkWriter writer) { writer.Write(target); } public override void OnDeserialize(NetworkReader reader) { target = reader.ReadGameObject(); } } public class ThrowKnife : BaseSkillState { public static GameObject projectilePrefab; 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); ((EntityState)this).PlayAnimation("Gesture, Override", "ThrowKnife", "Secondary.playbackRate", duration * 2f); if (!((BaseState)this).isGrounded) { ((EntityState)this).PlayAnimation("Body", "Jump"); } 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(); 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 WhirlwindAssaulter : WhirlwindBase { } public class WhirlwindBase : BaseSkillState { [SerializeField] public float walkSpeedCoefficient = 0.5f; [SerializeField] public float damageCoefficient = 3.5f; [SerializeField] public float smallHopVelocity = 8f; [SerializeField] public float baseDuration = 0.5f; [SerializeField] public float numAttacks = 2f; [SerializeField] public float hitPauseDuration = 0.05f; [SerializeField] public float entryVelocityDamp = 0.5f; [SerializeField] public float attackSoundPitch = 1f; [SerializeField] public string hitboxGroupName; [SerializeField] public string muzzleName; [SerializeField] public string attackSoundString = "NemmandoFireBeam2"; [SerializeField] public GameObject hitEffectPrefab; [SerializeField] public GameObject swingEffectPrefab; [SerializeField] public InterruptPriority interruptPriority = (InterruptPriority)2; private Animator animator; private float duration; private float timeBetweenAttacks; private float attackStopwatch; private OverlapAttack attack; private float timesAttacked; [NonSerialized] public bool hitEnemy; private bool isInHitPause; private float hitPauseTimer; private HitStopCachedState hitStopCachedState; public override void OnEnter() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((BaseState)this).StartAimMode(2f, false); animator = ((EntityState)this).GetModelAnimator(); duration = baseDuration / ((BaseState)this).attackSpeedStat; timeBetweenAttacks = duration / numAttacks; attack = ((BaseState)this).InitMeleeOverlap(damageCoefficient, hitEffectPrefab, ((EntityState)this).GetModelTransform(), hitboxGroupName); DamageAPI.AddModdedDamageType(attack, RedirectHologram.damageType); ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = walkSpeedCoefficient; ((EntityState)this).PlayAnimation("FullBody, Override", "SecondarySlash", "Secondary.playbackRate", duration * 0.825f); ((EntityState)this).PlayAnimation("Gesture, Override", "SecondarySlash", "Secondary.playbackRate", duration * 0.825f); } public override void FixedUpdate() { //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!isInHitPause) { attackStopwatch -= Time.fixedDeltaTime; ((EntityState)this).characterMotor.velocity.y = Mathf.Max(((EntityState)this).characterMotor.velocity.y, 0f); if (attackStopwatch <= 0f && timesAttacked < numAttacks) { FireAttack(); if (timesAttacked == numAttacks && !((BaseState)this).isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, smallHopVelocity); ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = 1f; } } } else { ((EntityState)this).characterMotor.velocity = Vector3.zero; hitPauseTimer -= Time.fixedDeltaTime; animator.SetFloat("Secondary.playbackRate", 0f); } if (((EntityState)this).isAuthority) { if (attack.Fire((List)null)) { OnHitEnemyAuthority(); } if (hitPauseTimer <= 0f && isInHitPause) { ((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator); isInHitPause = false; } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } } private void FireAttack() { Util.PlayAttackSpeedSound(attackSoundString, ((EntityState)this).gameObject, attackSoundPitch); EffectManager.SimpleMuzzleFlash(swingEffectPrefab, ((EntityState)this).gameObject, muzzleName, false); attackStopwatch += timeBetweenAttacks; attack.ResetIgnoredHealthComponents(); timesAttacked += 1f; } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = 1f; while (timesAttacked < numAttacks) { FireAttack(); attack.Fire((List)null); } } private void OnHitEnemyAuthority() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (!isInHitPause) { hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, "Secondary.playbackRate"); hitPauseTimer = hitPauseDuration / ((BaseState)this).attackSpeedStat; isInHitPause = true; } } public override InterruptPriority GetMinimumInterruptPriority() { if (timesAttacked < numAttacks) { return (InterruptPriority)2; } return (InterruptPriority)1; } } } namespace EntityStates.NemMerc.Clone { public class CloneDeath : GenericCharacterDeath { public override bool shouldAutoDestroy => true; public override void OnEnter() { ((GenericCharacterDeath)this).OnEnter(); ((GenericCharacterDeath)this).DestroyModel(); } } } namespace EntityStates.NemHuntress2 { public class BaseChargeArrow : BaseSkillState { [SerializeField] public float baseChargeDuration; private float chargeDuration; [SerializeField] public float maxDamageCoefficient; [SerializeField] public float minDamageCoefficient; [SerializeField] public float procCoefficient; [SerializeField] public float minRecoil; [SerializeField] public float maxRecoil; [SerializeField] public float minProjectileSpeed; [SerializeField] public float maxProjectileSpeed; [SerializeField] public float fireDuration; [SerializeField] public float maxSpreadAngle; private bool hasPlayedSound; private OverrideRequest crosshairOverrideRequest; private float baseSpreadRate; public override void OnEnter() { ((BaseState)this).OnEnter(); chargeDuration = baseChargeDuration / ((BaseState)this).attackSpeedStat; Util.PlayAttackSpeedSound("NemHuntressChargeBow", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); crosshairOverrideRequest = CrosshairUtils.RequestOverrideForBody(((EntityState)this).characterBody, ((EntityState)this).characterBody.defaultCrosshairPrefab, (OverridePriority)2); baseSpreadRate = ((EntityState)this).characterBody.spreadBloomDecayTime; ((EntityState)this).characterBody.spreadBloomDecayTime = 50f; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); float num = CalcCharge(); if (num >= 1f) { num = 1f; if (!hasPlayedSound) { hasPlayedSound = true; Util.PlaySound("NemHuntressBowMax", ((EntityState)this).gameObject); } } ((EntityState)this).characterBody.SetSpreadBloom(Util.Remap(num, 0f, 1f, 0f, 1f), true); ((BaseState)this).StartAimMode(2f, false); if (!((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= 0.1f) { BaseFireArrow baseFireArrow = new BaseFireArrow(); baseFireArrow.charge = num; baseFireArrow.maxDamageCoefficient = maxDamageCoefficient; baseFireArrow.minDamageCoefficient = minDamageCoefficient; baseFireArrow.procCoefficient = procCoefficient; baseFireArrow.minRecoil = minRecoil; baseFireArrow.maxRecoil = maxRecoil; baseFireArrow.minProjectileSpeed = minProjectileSpeed; baseFireArrow.maxProjectileSpeed = maxProjectileSpeed; baseFireArrow.baseDuration = fireDuration; baseFireArrow.maxSpreadAngle = maxSpreadAngle; ((EntityState)this).outer.SetNextState((EntityState)(object)baseFireArrow); } } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } public override void OnExit() { OverrideRequest val = crosshairOverrideRequest; if (val != null) { val.Dispose(); } ((EntityState)this).OnExit(); ((EntityState)this).characterBody.spreadBloomDecayTime = baseSpreadRate; } } public class BaseFireArrow : BaseSkillState { public float charge; public GameObject projectilePrefab; public float maxDamageCoefficient; public float minDamageCoefficient; public float procCoefficient; public float minRecoil; public float maxRecoil; public float minProjectileSpeed; public float maxProjectileSpeed; public float maxSpreadAngle; public float baseDuration; private float damageCoefficient; private float recoil; private float projectileSpeed; private float duration; private float spread; private bool hasFired; private NemHuntressController nhc; public override void OnEnter() { ((BaseState)this).OnEnter(); nhc = ((Component)((EntityState)this).characterBody).GetComponent(); if ((Object)(object)nhc != (Object)null) { projectilePrefab = nhc.currentArrow; } if ((Object)(object)projectilePrefab == (Object)null) { Debug.Log((object)"nemhuntress arrow projectile prefab is null .. what did you do?"); return; } ((EntityState)this).characterBody.SetAimTimer(2f); hasFired = false; duration = baseDuration / ((BaseState)this).attackSpeedStat; damageCoefficient = Util.Remap(charge, 0f, 1f, minDamageCoefficient, maxDamageCoefficient); recoil = Util.Remap(charge, 0f, 1f, minRecoil, maxRecoil); projectileSpeed = Util.Remap(charge, 0f, 1f, minProjectileSpeed, maxProjectileSpeed); spread = 0f; Util.PlayAttackSpeedSound("NemHuntressFireBow", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); FireProjectile(); } public virtual void FireProjectile() { //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) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_019b: 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_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) if (hasFired) { return; } hasFired = true; float damage = damageCoefficient * ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * recoil); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = CalculateSpreadDirection(((Ray)(ref aimRay)).direction, spread, spread); FireArrowProjectile(((Ray)(ref aimRay)).origin, direction, damage); if (((EntityState)this).skillLocator.primary.stock > 1) { Vector3 direction2 = CalculateSpreadDirection(((Ray)(ref aimRay)).direction, spread + 0f, -2f - spread); FireArrowProjectile(((Ray)(ref aimRay)).origin, direction2, damage); if (((EntityState)this).skillLocator.primary.stock > 2) { Vector3 direction3 = CalculateSpreadDirection(((Ray)(ref aimRay)).direction, spread + 0f, spread + 2f); FireArrowProjectile(((Ray)(ref aimRay)).origin, direction3, damage); if (((EntityState)this).skillLocator.primary.stock > 3) { Vector3 direction4 = CalculateSpreadDirection(((Ray)(ref aimRay)).direction, 1.5f + spread, spread + 1.5f); FireArrowProjectile(((Ray)(ref aimRay)).origin, direction4, damage); if (((EntityState)this).skillLocator.primary.stock > 4) { Vector3 direction5 = CalculateSpreadDirection(((Ray)(ref aimRay)).direction, 1.5f + spread, -1.5f - spread); FireArrowProjectile(((Ray)(ref aimRay)).origin, direction5, damage); if (((EntityState)this).skillLocator.primary.stock > 5) { Vector3 direction6 = CalculateSpreadDirection(((Ray)(ref aimRay)).direction, -1.5f - spread, spread + 1.5f); FireArrowProjectile(((Ray)(ref aimRay)).origin, direction6, damage); if (((EntityState)this).skillLocator.primary.stock > 6) { Vector3 direction7 = CalculateSpreadDirection(((Ray)(ref aimRay)).direction, -1.5f - spread, -1.5f - spread); FireArrowProjectile(((Ray)(ref aimRay)).origin, direction7, damage); } } } } } } ((EntityState)this).skillLocator.primary.stock = 1; nhc.currentArrow = nhc.baseArrow; } private void FireArrowProjectile(Vector3 origin, Vector3 direction, float damage) { //IL_000b: 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_000d: Unknown result type (might be due to invalid IL or missing references) ProjectileManager.instance.FireProjectile(projectilePrefab, origin, Util.QuaternionSafeLookRotation(direction), ((EntityState)this).gameObject, damage, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed); } private Vector3 CalculateSpreadDirection(Vector3 aimDirection, float angleOffsetX, float angleOffsetY) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return Quaternion.Euler(0f - angleOffsetX, angleOffsetY, 0f) * aimDirection; } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)((EntityState)this).skillLocator.primary, ((EntityState)this).skillLocator.primary.skillDef, (SkillOverridePriority)4); ((EntityState)this).skillLocator.special.cooldownScale = 1f; } 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)4; } } public class BaseSwapArrow : BaseState { [SerializeField] public float baseDuration = 0.2f; [SerializeField] public GameObject arrowPrefab; private float duration; private int primaryStockCount; private NemHuntressController nhc; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; nhc = ((Component)((EntityState)this).characterBody).GetComponent(); if ((Object)(object)nhc != (Object)null) { nhc.currentArrow = arrowPrefab; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } } public class ChargeArrow : BaseChargeArrow { } public class ChargeExplosiveArrow : BaseChargeArrow { } public class MiniDash : MiniBlinkState { public override void OnEnter() { ((BlinkState)this).OnEnter(); } public override void OnExit() { ((BlinkState)this).OnExit(); } } public class SwapExplosiveArrow : BaseSwapArrow { public override void OnEnter() { base.OnEnter(); } } public class ThrowHatchet : BasicMeleeAttack { public float charge; public static float projectileDmgCoefficient; public static float projectileProcCoefficient; public static float projectileRecoilAmount; public static float projectileBaseSpeed; public static GameObject projectilePrefab; public static float hopVelocity; private float fireDuration; private bool hasFired; public override void OnEnter() { ((BasicMeleeAttack)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2f); hasFired = false; fireDuration = 0.85f * base.duration; } public override void BeginMeleeAttackEffect() { ((BasicMeleeAttack)this).BeginMeleeAttackEffect(); FireProjectile(); HopIfAirborne(); } private void HopIfAirborne() { if (!((EntityState)this).characterMotor.isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hopVelocity); } } public virtual void FireProjectile() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; if (((EntityState)this).isAuthority) { float num = projectileDmgCoefficient * ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * projectileRecoilAmount, -3f * projectileRecoilAmount, -1f * projectileRecoilAmount, 1f * projectileRecoilAmount); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * projectileRecoilAmount); Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileBaseSpeed); } } } public override void FixedUpdate() { ((BasicMeleeAttack)this).FixedUpdate(); _ = ((EntityState)this).fixedAge; _ = fireDuration; } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } public override void AuthorityModifyOverlapAttack(OverlapAttack overlapAttack) { ((BasicMeleeAttack)this).AuthorityModifyOverlapAttack(overlapAttack); } } } namespace EntityStates.NemHuntress { public class Blink : BaseState { private Transform modelTransform; public static GameObject blinkprefab; private CharacterModel characterModel; private HurtBoxGroup hurtboxGroup; private float stopwatch; private Vector3 blinkVector = Vector3.zero; [SerializeField] public float duration = 0.3f; [SerializeField] public float speedCoefficient = 25f; [SerializeField] public string beginSoundString; [SerializeField] public string endSoundString; public override void OnEnter() { //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_00ad: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound(beginSoundString, ((EntityState)this).gameObject); modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { characterModel = ((Component)modelTransform).GetComponent(); hurtboxGroup = ((Component)modelTransform).GetComponent(); } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; obj.invisibilityCount++; } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { int hurtBoxesDeactivatorCounter = hurtboxGroup.hurtBoxesDeactivatorCounter + 1; hurtboxGroup.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter; } blinkVector = GetBlinkVector(); CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject)); } protected virtual Vector3 GetBlinkVector() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) return ((EntityState)this).inputBank.aimDirection; } private void CreateBlinkEffect(Vector3 origin) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_0008: 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_0012: 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) EffectData val = new EffectData(); val.rotation = Util.QuaternionSafeLookRotation(blinkVector); val.origin = origin; EffectManager.SpawnEffect(blinkprefab, val, false); } public override void FixedUpdate() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_004f: 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_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) ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += blinkVector * (base.moveSpeedStat * speedCoefficient * Time.fixedDeltaTime); } if (stopwatch >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).outer.destroying) { Util.PlaySound(endSoundString, ((EntityState)this).gameObject); CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject)); modelTransform = ((EntityState)this).GetModelBaseTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlay obj = ((Component)modelTransform).gameObject.AddComponent(); obj.duration = 0.6f; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = LegacyResourcesAPI.Load("Materials/matHuntressFlashBright"); obj.AddToCharacerModel(((Component)modelTransform).GetComponent()); TemporaryOverlay obj2 = ((Component)modelTransform).gameObject.AddComponent(); obj2.duration = 0.7f; obj2.animateShaderAlpha = true; obj2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj2.destroyComponentOnEnd = true; obj2.originalMaterial = LegacyResourcesAPI.Load("Materials/matHuntressFlashExpanded"); obj2.AddToCharacerModel(((Component)modelTransform).GetComponent()); } } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj3 = characterModel; obj3.invisibilityCount--; } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { _ = hurtboxGroup; int hurtBoxesDeactivatorCounter = hurtboxGroup.hurtBoxesDeactivatorCounter - 1; hurtboxGroup.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.disableAirControlUntilCollision = false; } ((EntityState)this).OnExit(); } } public class ChargeArrow : BaseSkillState { public static float baseChargeDuration = 1.75f; public static float maxEmission; public static float minEmission; public static GameObject lightningEffect; public static NetworkSoundEventDef sound; private float chargeDuration; private bool hasPlayedSound; public override void OnEnter() { ((BaseState)this).OnEnter(); chargeDuration = baseChargeDuration / ((BaseState)this).attackSpeedStat; } public override void FixedUpdate() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); float num = CalcCharge(); if (num > 1f) { num = 1f; if (Object.op_Implicit((Object)(object)sound) && !hasPlayedSound) { Debug.Log((object)"attempting to play full charge sound"); hasPlayedSound = true; EffectManager.SimpleSoundEffect(sound.index, ((EntityState)this).transform.position, true); } } ((EntityState)this).characterBody.SetSpreadBloom(Util.Remap(num, 0f, 1f, 0f, 1f), true); ((BaseState)this).StartAimMode(2f, false); if (((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= 0.1f) { FireArrow fireArrow = new FireArrow(); fireArrow.charge = num; ((EntityState)this).outer.SetNextState((EntityState)(object)fireArrow); } } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class ChargeBurstArrow : BaseSkillState { public static float baseChargeDuration = 2.1f; public static float maxEmission; public static float minEmission; public static GameObject lightningEffect; private float chargeDuration; public override void OnEnter() { ((BaseState)this).OnEnter(); chargeDuration = baseChargeDuration / ((BaseState)this).attackSpeedStat; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); float num = CalcCharge(); ((EntityState)this).characterBody.SetSpreadBloom(Util.Remap(num, 0f, 1f, 0f, 3f), true); ((BaseState)this).StartAimMode(2f, false); if ((double)num >= 0.142 && ((EntityState)this).characterBody.skillLocator.primary.stock == 1) { GenericSkill primary = ((EntityState)this).characterBody.skillLocator.primary; int stock = primary.stock; primary.stock = stock + 1; } if (((EntityState)this).isAuthority && (num >= 1f || (!((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= 0.1f))) { FireBurstArrow fireBurstArrow = new FireBurstArrow(); fireBurstArrow.charge = num; ((EntityState)this).outer.SetNextState((EntityState)(object)fireBurstArrow); } } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class ChargeExplosiveArrow : BaseSkillState { public static float baseChargeDuration = 1.75f; public static float maxEmission; public static float minEmission; public static GameObject lightningEffect; public static NetworkSoundEventDef sound; private float chargeDuration; private bool hasPlayedSound; public override void OnEnter() { ((BaseState)this).OnEnter(); chargeDuration = baseChargeDuration / ((BaseState)this).attackSpeedStat; } public override void FixedUpdate() { //IL_003b: 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) ((EntityState)this).FixedUpdate(); float num = CalcCharge(); if (num > 1f) { num = 1f; if (Object.op_Implicit((Object)(object)sound) && !hasPlayedSound) { hasPlayedSound = true; EffectManager.SimpleSoundEffect(sound.index, ((EntityState)this).transform.position, true); } } ((EntityState)this).characterBody.SetSpreadBloom(Util.Remap(num, 0f, 1f, 0f, 1f), true); ((BaseState)this).StartAimMode(2f, false); if (((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= 0.1f) { FireExplosiveArrow fireExplosiveArrow = new FireExplosiveArrow(); fireExplosiveArrow.charge = num; ((EntityState)this).outer.SetNextState((EntityState)(object)fireExplosiveArrow); } } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class FireArrow : BaseSkillState { public float charge; public static float maxDamageCoefficient; public static float minDamageCoeffficient; public static float procCoefficient; public static float maxRecoil; public static float minRecoil; public static float maxProjectileSpeed; public static float minProjectileSpeed; public static float baseDuration; public static GameObject projectilePrefab; private float damageCoefficient; private float recoil; private float projectileSpeed; private float duration; private float fireDuration; private bool hasFired; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); hasFired = false; duration = baseDuration / ((BaseState)this).attackSpeedStat; damageCoefficient = Util.Remap(charge, 0f, 1f, minDamageCoeffficient, maxDamageCoefficient); recoil = Util.Remap(charge, 0f, 1f, minRecoil, maxRecoil); projectileSpeed = Util.Remap(charge, 0f, 1f, minProjectileSpeed, maxProjectileSpeed); fireDuration = 0.4f * duration; _ = charge; _ = 0.6f; bool @bool = animator.GetBool("isMoving"); bool bool2 = animator.GetBool("isGrounded"); _ = !@bool && bool2; } public override void OnExit() { ((EntityState)this).OnExit(); } public virtual void FireProjectile() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; if (((EntityState)this).isAuthority) { float num = damageCoefficient * ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * recoil); Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireDuration) { FireProjectile(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class FireBurstArrow : BaseSkillState { public float charge; public static float maxDamageCoefficient; public static float minDamageCoeffficient; public static float procCoefficient; public static float maxRecoil; public static float minRecoil; public static float maxProjectileSpeed; public static float minProjectileSpeed; public static float baseDuration; public static GameObject projectilePrefab; private float damageCoefficient; private float recoil; private float projectileSpeed; private float duration; private float fireDuration; private bool hasFired; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); hasFired = false; duration = baseDuration / ((BaseState)this).attackSpeedStat; damageCoefficient = Util.Remap(charge, 0f, 1f, minDamageCoeffficient, maxDamageCoefficient); recoil = Util.Remap(charge, 0f, 1f, minRecoil, maxRecoil); projectileSpeed = Util.Remap(charge, 0f, 1f, minProjectileSpeed, maxProjectileSpeed); fireDuration = 0.4f * duration; _ = charge; _ = 0.6f; bool @bool = animator.GetBool("isMoving"); bool bool2 = animator.GetBool("isGrounded"); _ = !@bool && bool2; } public override void OnExit() { ((EntityState)this).OnExit(); } public virtual void FireProjectile() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) if (hasFired) { return; } hasFired = true; if (!((EntityState)this).isAuthority) { return; } float num = damageCoefficient * ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * recoil); Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed); if ((double)charge >= 0.142) { ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(new Vector3(((Ray)(ref aimRay)).direction.x, ((Ray)(ref aimRay)).direction.y + 5f, ((Ray)(ref aimRay)).direction.z)), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed); if (((EntityState)this).characterBody.skillLocator.primary.stock != 1) { GenericSkill primary = ((EntityState)this).characterBody.skillLocator.primary; int stock = primary.stock; primary.stock = stock - 1; } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireDuration) { FireProjectile(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class FireExplosiveArrow : BaseSkillState { public float charge; public static float maxDamageCoefficient; public static float minDamageCoeffficient; public static float procCoefficient; public static float maxRecoil; public static float minRecoil; public static float maxProjectileSpeed; public static float minProjectileSpeed; public static float baseDuration; public static GameObject projectilePrefab; private float damageCoefficient; private float recoil; private float projectileSpeed; private float duration; private float fireDuration; private bool hasFired; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); hasFired = false; duration = baseDuration / ((BaseState)this).attackSpeedStat; damageCoefficient = Util.Remap(charge, 0f, 1f, minDamageCoeffficient, maxDamageCoefficient); recoil = Util.Remap(charge, 0f, 1f, minRecoil, maxRecoil); projectileSpeed = Util.Remap(charge, 0f, 1f, minProjectileSpeed, maxProjectileSpeed); fireDuration = 0.4f * duration; _ = charge; _ = 0.6f; bool @bool = animator.GetBool("isMoving"); bool bool2 = animator.GetBool("isGrounded"); _ = !@bool && bool2; } public override void OnExit() { ((EntityState)this).OnExit(); } public virtual void FireProjectile() { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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_0096: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; if (((EntityState)this).isAuthority) { float num = maxDamageCoefficient * ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * recoil); Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireDuration) { FireProjectile(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class SwapArrowExplosive : BaseState { public static float baseDuration = 0.2f; public static GameObject arrowPrefab; private float duration; private NemHuntressController nhc; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; nhc = ((Component)((EntityState)this).characterBody).GetComponent(); if ((Object)(object)nhc != (Object)null) { nhc.currentArrow = arrowPrefab; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } } public class ThrowHatchet : BaseSkillState { public float charge; public static float dmgCoefficient; public static float procCoefficient; public static float recoilAmount; public static float projSpeed; public static float baseDuration; public static GameObject projectilePrefab; private float damageCoefficient; private float recoil; private float projectileSpeed; private float duration; private float fireDuration; private bool hasFired; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); hasFired = false; duration = baseDuration / ((BaseState)this).attackSpeedStat; damageCoefficient = dmgCoefficient; recoil = recoilAmount; projectileSpeed = projSpeed; fireDuration = 0.1f * duration; _ = charge; _ = 0.6f; bool @bool = animator.GetBool("isMoving"); bool bool2 = animator.GetBool("isGrounded"); _ = !@bool && bool2; } public override void OnExit() { ((EntityState)this).OnExit(); } public virtual void FireProjectile() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; if (((EntityState)this).isAuthority) { float num = damageCoefficient * ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * recoil); Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireDuration) { FireProjectile(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } } namespace EntityStates.NemCommando { public class GrenadeLeap : BaseSkillState { public static float baseDuration; private float duration; public static float airControl; private float previousAirControl; public static float upwardVelocity; public static float forwardVelocity; public static float minimumY; public static float aimVelocity; private float throwDur; private bool hasThrown; public static GameObject projectilePrefab; public static float damageCoefficient; public static float projectileSpeed; private Animator animator; public override void OnEnter() { //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_007c: 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) //IL_0086: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: 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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: 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_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; throwDur = duration * 0.6f; ((EntityState)this).characterBody.SetAimTimer(duration * 1.2f); animator = ((EntityState)this).GetModelAnimator(); ((EntityState)this).PlayCrossfade("Body", "AltUtility", "Utility.rate", duration * 1.4f, 0.05f); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = -((Ray)(ref aimRay)).direction; if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.isSprinting = true; val.y = Mathf.Max(val.y, minimumY); Vector3 val2 = ((Vector3)(ref val)).normalized * aimVelocity * ((BaseState)this).moveSpeedStat; Vector3 val3 = Vector3.up * upwardVelocity; Vector3 val4 = new Vector3(val.x, 0f, val.z); Vector3 val5 = ((Vector3)(ref val4)).normalized * forwardVelocity; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(); ((EntityState)this).characterMotor.velocity = val2 + val3 + val5; } } public override void FixedUpdate() { if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } if (!hasThrown && animator.GetFloat("throwGrenades") >= 0.5f) { hasThrown = true; ThrowGrenades(); } ((EntityState)this).FixedUpdate(); } public void ThrowGrenades() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: 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_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_0056: 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) Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; Vector3 normalized = ((Vector3)(ref direction)).normalized; Vector3 direction2 = Quaternion.Euler(0f, -35f, 0f) * normalized; Vector3 direction3 = Quaternion.Euler(0f, 35f, 0f) * normalized; Grenade(direction); Grenade(direction2); Grenade(direction3); } private void Grenade(Vector3 direction) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_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_0026: Unknown result type (might be due to invalid IL or missing references) float num = damageCoefficient * ((BaseState)this).damageStat; Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(direction), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed); } public override void OnExit() { ((EntityState)this).OnExit(); } } public class ReloadGun : BaseState { private bool hasReloaded; public static float baseDuration; public static string reloadEffectMuzzleString; public static GameObject reloadEffectPrefab; public static string enterSoundString; public static string exitSoundString; public static float exitSoundpitch; public static float enterSoundPitch; private Animator animator; private bool hasEjectedMag; private float duration => baseDuration / base.attackSpeedStat * ((EntityState)this).skillLocator.secondary.cooldownScale; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); ((EntityState)this).PlayCrossfade("Gesture, Override, LeftArm", "LowerGun", "FireGun.playbackRate", duration, 0.3f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if ((double)animator.GetFloat("ejectMag") >= 0.1 && !hasEjectedMag) { hasEjectedMag = true; ((Component)((BaseState)this).FindModelChild("magParticle")).GetComponent().Emit(1); } if ((double)((EntityState)this).fixedAge >= (double)duration * 0.6 && !hasReloaded) { Util.PlayAttackSpeedSound(enterSoundString, ((EntityState)this).gameObject, enterSoundPitch); ((EntityState)this).skillLocator.secondary.stock = ((EntityState)this).skillLocator.secondary.maxStock; hasReloaded = true; } if (((EntityState)this).isAuthority && !(((EntityState)this).fixedAge < duration)) { if (((EntityState)this).inputBank.skill2.down) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ShootGun2()); GenericSkill secondary = ((EntityState)this).skillLocator.secondary; secondary.stock -= 1; } else { ((EntityState)this).outer.SetNextStateToMain(); } } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class ShootGun2 : BaseSkillState { [TokenModifier(/*Could not decode attribute arguments.*/)] public static float damageCoefficient; public static float procCoefficient; public static float baseDuration; public static float minimumDuration; public static float force; public static float recoil; public static float range; public static string muzzleString; public static string soundString; private string skinNameToken; [HideInInspector] public static GameObject tracerEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/GoldGat/TracerGoldGat.prefab").WaitForCompletion(); private float fireTime; private bool hasFired; private Animator animator; private float duration => baseDuration / ((BaseState)this).attackSpeedStat; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; fireTime = 0.1f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_GM") { muzzleString = "Suppressor"; } else { muzzleString = "Muzzle"; } animator.SetBool("shouldAdditiveReload", false); if ((double)animator.GetFloat("primaryPlaying") > 0.05) { ((EntityState)this).PlayCrossfade("Gesture, Override, LowerLeftArm", "FireGun", "FireGun.playbackRate", baseDuration, 0.005f); animator.SetBool("shouldAdditiveReload", true); } ((EntityState)this).PlayCrossfade("Gesture, Override, LeftArm", "FireGun", "FireGun.playbackRate", baseDuration, 0.005f); } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: 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_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_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_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0146: 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_015d: 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_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018d: 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_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) if (hasFired) { return; } hasFired = true; bool isCrit = ((BaseState)this).RollCrit(); EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); if (soundString != string.Empty) { Util.PlaySound(soundString, ((EntityState)this).gameObject); } if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * recoil, -2f * recoil, -0.5f * recoil, 0.5f * recoil); float num = 0f; float num2 = ((EntityState)this).characterBody.spreadBloomAngle; if ((int)((EntityState)this).teamComponent.teamIndex != 1) { num += 2f; num2 += 4f; } new BulletAttack { bulletCount = 1u, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, damageType = (DamageType)0, falloffModel = (FalloffModel)1, maxDistance = range, force = force, hitMask = CommonMasks.bullet, minSpread = num, maxSpread = num2, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 0.75f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = tracerEffectPrefab, spreadPitchScale = 1f, spreadYawScale = 1f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = FirePistol2.hitEffectPrefab }.Fire(); ((Component)((BaseState)this).FindModelChild("casingParticle")).GetComponent().Emit(1); ((EntityState)this).characterBody.AddSpreadBloom(3f); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireTime * duration) { Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { if (((EntityState)this).inputBank.skill2.down & (((EntityState)this).skillLocator.secondary.stock >= 1)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ShootGun2()); GenericSkill secondary = ((EntityState)this).skillLocator.secondary; secondary.stock -= 1; } else if (((EntityState)this).fixedAge >= 1.5f * duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ReloadGun()); } } } public override InterruptPriority GetMinimumInterruptPriority() { if (!(((EntityState)this).fixedAge <= minimumDuration)) { return (InterruptPriority)0; } return (InterruptPriority)2; } } public class Submission : BaseSkillState { [TokenModifier(/*Could not decode attribute arguments.*/)] public static float damageCoefficient; public static float procCoefficient; public static uint bulletCountPerShot; public static float range; public static float maxSpread; [TokenModifier(/*Could not decode attribute arguments.*/)] public static int BulletCount; public static float baseDuration; public static float recoil; public static GameObject tracerPrefab; public static GameObject muzzleFlashPrefab; public static GameObject hitSparkPrefab; public static float baseDurationBetweenShots; private int totalBulletsFired; private int bulletCount; private float durationBetweenShots; public float stopwatchBetweenShots; public float charge; private Animator modelAnimator; private Transform modelTransform; private float duration; private string skinNameToken; private GameObject muzzleFlashEffect = Resources.Load("Prefabs/Effects/ImpactEffects/FusionCellExplosion"); [HideInInspector] public override void OnEnter() { //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetSpreadBloom(0.2f, false); duration = baseDuration; durationBetweenShots = baseDurationBetweenShots / ((BaseState)this).attackSpeedStat; bulletCount = (int)((float)BulletCount * ((BaseState)this).attackSpeedStat); modelAnimator = ((EntityState)this).GetModelAnimator(); modelTransform = ((EntityState)this).GetModelTransform(); ((EntityState)this).characterBody.SetAimTimer(2f); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; skinNameToken = ((Component)modelTransform).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; if (skinNameToken != "SS2_SKIN_NEMCOMMANDO_DEFAULT" && skinNameToken != "SS2_SKIN_NEMCOMMANDO_GRANDMASTERY") { if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_MASTERY") { tracerPrefab = SS2Assets.LoadAsset("TracerNemCommandoShotgunYellow", SS2Bundle.NemCommando); muzzleFlashPrefab = SS2Assets.LoadAsset("MuzzleflashNemCommandoYellow", SS2Bundle.NemCommando); hitSparkPrefab = SS2Assets.LoadAsset("HitsparkNemCommandoYellow", SS2Bundle.NemCommando); } if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_COMMANDO") { tracerPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/TracerCommandoShotgun.prefab").WaitForCompletion(); muzzleFlashPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/MuzzleflashFMJ.prefab").WaitForCompletion(); hitSparkPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/HitsparkCommandoShotgun.prefab").WaitForCompletion(); } } else { tracerPrefab = SS2Assets.LoadAsset("TracerNemCommandoShotgunRed", SS2Bundle.NemCommando); muzzleFlashPrefab = SS2Assets.LoadAsset("MuzzleflashNemCommandoRed", SS2Bundle.NemCommando); hitSparkPrefab = SS2Assets.LoadAsset("HitsparkNemCommandoRed", SS2Bundle.NemCommando); } FireBullet(); } private void FireBullet() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: 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_0101: 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_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0141: 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_015d: 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_016f: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018d: 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_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); string text = "Muzzle"; EffectManager.SimpleMuzzleFlash(muzzleFlashPrefab, ((EntityState)this).gameObject, text, false); Util.PlaySound("NemmandoSubmissionFire", ((EntityState)this).gameObject); if ((double)modelAnimator.GetFloat("primaryPlaying") > 0.05) { ((EntityState)this).PlayCrossfade("Gesture, Override, LowerLeftArm", "FireGunSpecial", "Special.playbackRate", durationBetweenShots, durationBetweenShots / 2f); } ((EntityState)this).PlayCrossfade("Gesture, Override, LeftArm", "FireGunSpecial", "Special.playbackRate", durationBetweenShots, durationBetweenShots / 2f); ((BaseState)this).AddRecoil(-0.8f * recoil, -1f * recoil, -0.1f * recoil, 0.15f * recoil); if (((EntityState)this).isAuthority) { new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0f, maxSpread = maxSpread, bulletCount = bulletCountPerShot, damage = damageCoefficient * ((BaseState)this).damageStat, force = 0.5f * FireBarrage.force, tracerEffectPrefab = tracerPrefab, muzzleName = text, hitEffectPrefab = hitSparkPrefab, isCrit = ((BaseState)this).RollCrit(), radius = FireBarrage.bulletRadius, smartCollision = true, damageType = (DamageType)32, spreadPitchScale = 0.5f, spreadYawScale = 0.5f, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, falloffModel = (FalloffModel)1, maxDistance = range }.Fire(); } ((EntityState)this).characterBody.AddSpreadBloom(2f * FireBarrage.spreadBloomValue); totalBulletsFired++; } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatchBetweenShots += Time.fixedDeltaTime; if (stopwatchBetweenShots >= durationBetweenShots && totalBulletsFired < bulletCount) { stopwatchBetweenShots -= durationBetweenShots; FireBullet(); } if (((EntityState)this).fixedAge >= duration && totalBulletsFired == bulletCount && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } internal class SwingSword2 : BasicMeleeAttack, IStepSetter, ISkillState { public static float swingTimeCoefficient = 1.71f; public int swingSide; private bool inCombo; private string skinNameToken; [TokenModifier(/*Could not decode attribute arguments.*/)] public static float TokenModifier_dmgCoefficient => ((BasicMeleeAttack)new SwingSword2()).damageCoefficient; public GenericSkill activatorSkillSlot { get; set; } public override void OnEnter() { skinNameToken = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; base.swingEffectPrefab = SS2Assets.LoadAsset("NemCommandoSwingEffect", SS2Bundle.NemCommando); base.hitEffectPrefab = SS2Assets.LoadAsset("NemmandoImpactSlashEffect", SS2Bundle.NemCommando); if (skinNameToken != "SS2_SKIN_NEMCOMMANDO_DEFAULT" && skinNameToken != "SS2_SKIN_NEMCOMMANDO_GRANDMASTERY") { if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_MASTERY") { base.swingEffectPrefab = SS2Assets.LoadAsset("NemCommandoSwingEffectYellow", SS2Bundle.NemCommando); base.hitEffectPrefab = SS2Assets.LoadAsset("NemCommandoImpactSlashEffectYellow", SS2Bundle.NemCommando); } if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_COMMANDO") { base.swingEffectPrefab = SS2Assets.LoadAsset("NemCommandoSwingEffectBlue", SS2Bundle.NemCommando); base.hitEffectPrefab = SS2Assets.LoadAsset("NemCommandoImpactSlashEffectBlue", SS2Bundle.NemCommando); } } ((BasicMeleeAttack)this).OnEnter(); base.animator = ((EntityState)this).GetModelAnimator(); } public override void PlayAnimation() { string text = "Primary" + (1 + swingSide); if (inCombo) { text = "Primary3"; } ((EntityState)this).PlayCrossfade("Gesture, Override", text, "Primary.playbackRate", base.duration * swingTimeCoefficient, 0.05f); } void IStepSetter.SetStep(int i) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) swingSide = i; if (swingSide > 1) { ((InstanceData)activatorSkillSlot.skillInstanceData).step = 0; swingSide = 0; inCombo = true; } } public override void OnSerialize(NetworkWriter writer) { ((EntityState)this).OnSerialize(writer); writer.Write((byte)swingSide); SkillStateMethods.Serialize((ISkillState)(object)this, ((EntityState)this).skillLocator, writer); } public override void OnDeserialize(NetworkReader reader) { ((EntityState)this).OnDeserialize(reader); swingSide = reader.ReadByte(); SkillStateMethods.Deserialize((ISkillState)(object)this, ((EntityState)this).skillLocator, reader); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } public override void AuthorityModifyOverlapAttack(OverlapAttack overlapAttack) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)this).AuthorityModifyOverlapAttack(overlapAttack); DamageAPI.AddModdedDamageType(overlapAttack, Moonstorm.Starstorm2.DamageTypes.Gouge.gougeDamageType); } } public class SwordBeam : BaseSkillState { public float charge; public static float maxEmission; public static float minEmission; [TokenModifier(/*Could not decode attribute arguments.*/)] public static float damageCoefficient; public static float procCoefficient; public static float maxRecoil; public static float minRecoil; public static float projectileSpeed; public static float baseDuration; public static GameObject projectilePrefab; private float recoil; private float duration; private float fireDuration; private bool hasFired; private string muzzleString; private string skinNameToken; private GameObject muzzleFlash; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2f); hasFired = false; duration = baseDuration / ((BaseState)this).attackSpeedStat; recoil = Util.Remap(charge, 0f, 1f, minRecoil, maxRecoil); fireDuration = 0.1f * duration; ((EntityState)this).PlayCrossfade("Gesture, Override", "SecondaryBeam", "Secondary.playbackRate", duration, 0.05f); Util.PlaySound("NemmandoFireBeam2", ((EntityState)this).gameObject); } public override void OnExit() { ((EntityState)this).OnExit(); } public virtual void FireBeam() { //IL_0158: 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_016a: 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_0176: Unknown result type (might be due to invalid IL or missing references) if (hasFired) { return; } hasFired = true; skinNameToken = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; if (skinNameToken != "SS2_SKIN_NEMCOMMANDO_DEFAULT") { if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_COMMANDO") { muzzleFlash = SS2Assets.LoadAsset("MuzzleflashNemCommandoYellow", SS2Bundle.NemCommando); projectilePrefab = SS2Assets.LoadAsset("NemCommandoSwordBeamProjectileBlue", SS2Bundle.NemCommando); } if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_MASTERY") { muzzleFlash = SS2Assets.LoadAsset("MuzzleflashNemCommandoYellow", SS2Bundle.NemCommando); projectilePrefab = SS2Assets.LoadAsset("NemCommandoSwordBeamProjectileYellow", SS2Bundle.NemCommando); } } else { muzzleFlash = SS2Assets.LoadAsset("MuzzleflashNemCommandoRed", SS2Bundle.NemCommando); projectilePrefab = SS2Assets.LoadAsset("NemCommandoSwordBeamProjectile", SS2Bundle.NemCommando); } EffectManager.SimpleMuzzleFlash(muzzleFlash, ((EntityState)this).gameObject, muzzleString, false); if (((EntityState)this).isAuthority) { float num = damageCoefficient * ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * recoil); Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireDuration) { FireBeam(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } } namespace EntityStates.NemCommmando { public class Dodge2 : BaseSkillState { public float duration = 0.6f; public float initialSpeedCoefficient = 7.5f; public float finalSpeedCoefficient = 1f; public static float dodgeFOV = -1f; public static GameObject JetEffect; public static string DashJetL; public static string DashJetR; private float rollSpeed; private Vector3 forwardDirection; private Vector3 previousPosition; private Animator animator; private EntityStateMachine swordSM; private NetworkStateMachine nsm; private string skinNameToken; public override void OnEnter() { //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_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_0291: 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_011d: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); ChildLocator component = ((Component)animator).GetComponent(); Util.PlaySound(DodgeState.dodgeSoundString, ((EntityState)this).gameObject); animator.SetBool("isRolling", true); ((EntityState)this).PlayCrossfade("Body", "Utility", "Utility.rate", duration * 1.25f, 0.05f); ((EntityState)this).PlayCrossfade("Gesture, Override", "BufferEmpty", 0.05f); ((EntityState)this).PlayCrossfade("FullBody, Override", "BufferEmpty", 0.05f); ((EntityState)this).PlayCrossfade("Gesture, Override, LeftArm", "BufferEmpty", 0.05f); ((EntityState)this).PlayCrossfade("Gesture, Additive, LeftArm", "BufferEmpty", 0.05f); if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(Buffs.ArmorBoost, 1.5f * duration); } if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).inputBank.moveVector); forwardDirection = ((Vector3)(ref val)).normalized; } RecalculateRollSpeed(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterMotor.velocity.y = 0f; ((EntityState)this).characterMotor.velocity = forwardDirection * rollSpeed; } skinNameToken = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; if (Object.op_Implicit((Object)(object)JetEffect) && skinNameToken != "SS2_SKIN_NEMCOMMANDO_GRANDMASTERY") { if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_DEFAULT") { JetEffect = SS2Assets.LoadAsset("NemCommandoDashJets", SS2Bundle.NemCommando); } if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_MASTERY") { JetEffect = SS2Assets.LoadAsset("NemCommandoDashJetsYellow", SS2Bundle.NemCommando); } if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_COMMANDO") { JetEffect = SS2Assets.LoadAsset("NemCommandoDashJetsBlue", SS2Bundle.NemCommando); } Transform val2 = component.FindChild(DashJetL); Transform val3 = component.FindChild(DashJetR); if (Object.op_Implicit((Object)(object)val2)) { Object.Instantiate(JetEffect, val2); } if (Object.op_Implicit((Object)(object)val3)) { Object.Instantiate(JetEffect, val3); } } Vector3 val4 = (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) ? ((EntityState)this).characterMotor.velocity : Vector3.zero); previousPosition = ((EntityState)this).transform.position - val4; } private void RecalculateRollSpeed() { rollSpeed = ((BaseState)this).moveSpeedStat * Mathf.Lerp(initialSpeedCoefficient, finalSpeedCoefficient, ((EntityState)this).fixedAge / duration); } public override void FixedUpdate() { //IL_001d: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0147: 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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009f: 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_00ab: 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_00c9: 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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: 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_00f7: 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_00ff: 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_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); RecalculateRollSpeed(); if (((EntityState)this).isAuthority) { Vector3 val = ((EntityState)this).transform.position - previousPosition; Vector3 normalized = ((Vector3)(ref val)).normalized; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && normalized != Vector3.zero) { Vector3 val2 = normalized * rollSpeed; float y = val2.y; val2.y = 0f; float num = Mathf.Max(Vector3.Dot(val2, forwardDirection), 0f); val2 = forwardDirection * num; val2.y += Mathf.Max(y, 0f); ((EntityState)this).characterMotor.velocity = val2; Vector3 val3 = (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) ? ((EntityState)this).characterDirection.forward : forwardDirection); Vector3 val4 = Vector3.Cross(Vector3.up, val3); float num2 = Vector3.Dot(forwardDirection, val3); float num3 = Vector3.Dot(forwardDirection, val4); animator.SetFloat("forwardSpeed", num2); animator.SetFloat("rightSpeed", num3); } previousPosition = ((EntityState)this).transform.position; if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } } public override void OnExit() { animator.SetBool("isRolling", false); Object.op_Implicit((Object)(object)swordSM); animator.SetBool("shouldExit", true); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.fovOverride = -1f; } ((EntityState)this).OnExit(); } public override void OnSerialize(NetworkWriter writer) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnSerialize(writer); writer.Write(forwardDirection); } public override void OnDeserialize(NetworkReader reader) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnDeserialize(reader); forwardDirection = reader.ReadVector3(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } } namespace EntityStates.NemCaptainDrone { public class BaseNemCaptainDroneState : BaseState { protected TeamFilter teamFilter; private ProxyInteraction interactionComponent; protected virtual string GetContextString(Interactor activator) { return null; } protected virtual Interactability GetInteractability(Interactor activator) { return (Interactability)0; } protected virtual void OnInteractionBegin(Interactor activator) { } protected virtual bool ShouldShowOnScanner() { return false; } protected virtual bool ShouldIgnoreSpherecaseForInteractability(Interactor activator) { return false; } private string GetContextStringInternal(ProxyInteraction proxyInteraction, Interactor activator) { return GetContextString(activator); } private Interactability GetInteractabilityInternal(ProxyInteraction proxyInteraction, Interactor activator) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return GetInteractability(activator); } private void OnInteractionBeginInternal(ProxyInteraction proxyInteraction, Interactor activator) { OnInteractionBegin(activator); } private bool ShouldIgnoreSPherecastForInteractabilityInternal(ProxyInteraction proxyInteraction, Interactor activator) { return ShouldIgnoreSpherecaseForInteractability(activator); } private bool ShouldShowOnScannerInternal(ProxyInteraction proxyInteraction) { return ShouldShowOnScanner(); } public override void OnEnter() { ((BaseState)this).OnEnter(); teamFilter = ((EntityState)this).GetComponent(); interactionComponent = ((EntityState)this).GetComponent(); interactionComponent.getContextString = GetContextStringInternal; interactionComponent.getInteractability = GetInteractabilityInternal; interactionComponent.onInteractionBegin = OnInteractionBeginInternal; interactionComponent.shouldShowOnScanner = ShouldShowOnScannerInternal; interactionComponent.shouldIgnoreSpherecastForInteractability = ShouldIgnoreSPherecastForInteractabilityInternal; } public override void OnExit() { interactionComponent.getContextString = null; interactionComponent.getInteractability = null; interactionComponent.onInteractionBegin = null; interactionComponent.shouldShowOnScanner = null; interactionComponent.shouldIgnoreSpherecastForInteractability = null; ((EntityState)this).OnExit(); } } public class BlackHoleState : BaseNemCaptainDroneState { public static GameObject blackHolePrefab; public static float lifetime; private GameObject blackHoleInstance; protected override Interactability GetInteractability(Interactor activator) { return (Interactability)0; } public override void OnEnter() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); if (NetworkServer.active) { blackHoleInstance = Object.Instantiate(blackHolePrefab, ((EntityState)this).transform.position, ((EntityState)this).transform.rotation); blackHoleInstance.GetComponent().teamIndex = teamFilter.teamIndex; NetworkServer.Spawn(blackHoleInstance); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= lifetime) { Debug.Log((object)"I should be dead right now!!!"); ((EntityState)this).outer.SetNextState((EntityState)(object)new ExitState()); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)blackHoleInstance)) { EntityState.Destroy((Object)(object)blackHoleInstance); } base.OnExit(); } } public class BuffZoneState : BaseNemCaptainDroneState { public static GameObject buffZonePrefab; public static float lifetime; private GameObject buffZoneInstance; protected override Interactability GetInteractability(Interactor activator) { return (Interactability)0; } public override void OnEnter() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); if (NetworkServer.active) { buffZoneInstance = Object.Instantiate(buffZonePrefab, ((EntityState)this).transform.position, ((EntityState)this).transform.rotation); buffZoneInstance.GetComponent().teamIndex = teamFilter.teamIndex; NetworkServer.Spawn(buffZoneInstance); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= lifetime) { Debug.Log((object)"I should be dead right now!!!"); ((EntityState)this).outer.SetNextState((EntityState)(object)new ExitState()); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)buffZoneInstance)) { EntityState.Destroy((Object)(object)buffZoneInstance); } base.OnExit(); } } public class EntryState : BaseNemCaptainDroneState { private float duration; public static float baseDuration; public override void OnEnter() { base.OnEnter(); duration = baseDuration; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } } public class ExitState : BaseNemCaptainDroneState { private float duration; public static float baseDuration; private Transform modelTransform; private EffectData effectData; public override void OnEnter() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //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) //IL_0051: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); modelTransform = ((EntityState)this).GetModelBaseTransform(); ((Component)modelTransform).gameObject.SetActive(false); effectData = new EffectData { origin = modelTransform.position }; EffectManager.SpawnEffect(EffectCatalog.FindEffectIndexFromPrefab(Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/CaptainSuplyDropExplosion.prefab").WaitForCompletion()), effectData, true); duration = baseDuration; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } } public class HealZoneState : BaseNemCaptainDroneState { public static GameObject healZonePrefab; public static float lifetime; private GameObject healZoneInstance; protected override Interactability GetInteractability(Interactor activator) { return (Interactability)0; } public override void OnEnter() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); if (NetworkServer.active) { healZoneInstance = Object.Instantiate(healZonePrefab, ((EntityState)this).transform.position, ((EntityState)this).transform.rotation); healZoneInstance.GetComponent().teamIndex = teamFilter.teamIndex; NetworkServer.Spawn(healZoneInstance); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= lifetime) { Debug.Log((object)"I should be dead right now!!!"); ((EntityState)this).outer.SetNextState((EntityState)(object)new ExitState()); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)healZoneInstance)) { EntityState.Destroy((Object)(object)healZoneInstance); } base.OnExit(); } } } namespace EntityStates.NemCaptain { public class ArmRifle : BaseSkillState { public static float baseArmDuration = 1f; private float armDuration; public static string enterSoundString; public static float enterSoundPitch; public override void OnEnter() { ((BaseState)this).OnEnter(); armDuration = baseArmDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(armDuration * 2f); Util.PlayAttackSpeedSound(enterSoundString, ((EntityState)this).gameObject, enterSoundPitch); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= armDuration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new FireRifle()); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class FireRifle : BaseSkillState { public static float damageCoefficient; public static float procCoefficient; public static float baseDuration; public static float force; public static float recoil; public static float range; public static string soundString; public static string muzzleString; [HideInInspector] public static GameObject tracerEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/Railgunner/TracerRailgun.prefab").WaitForCompletion(); private float fireTime; private bool hasFired; private NemCaptainController ncc; private float duration => baseDuration / ((BaseState)this).attackSpeedStat; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; fireTime = 0.1f * duration; hasFired = false; ncc = ((Component)((EntityState)this).characterBody).GetComponent(); } private void Fire() { //IL_0045: 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_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 //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_0101: 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_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_013e: 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_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015a: 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_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0179: 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_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: 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_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) if (hasFired) { return; } hasFired = true; bool isCrit = ((BaseState)this).RollCrit(); if (soundString != string.Empty) { Util.PlaySound(soundString, ((EntityState)this).gameObject); } if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * recoil, -2f * recoil, -0.5f * recoil, 0.5f * recoil); float num = 0f + 4f * ncc.stressFraction; float num2 = ((EntityState)this).characterBody.spreadBloomAngle + 8f * ncc.stressFraction; if ((int)((EntityState)this).teamComponent.teamIndex != 1) { num += 2f * (2f * ncc.stressFraction); num2 += 2f + 4f * ncc.stressFraction; } new BulletAttack { bulletCount = 1u, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, damageType = (DamageType)32, falloffModel = (FalloffModel)1, maxDistance = range, force = force, hitMask = CommonMasks.bullet, minSpread = num, maxSpread = num2, isCrit = isCrit, owner = ((EntityState)this).gameObject, smartCollision = true, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 1.5f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = tracerEffectPrefab, spreadPitchScale = 1f + 4f * ncc.stressFraction, spreadYawScale = 1f + 4f * ncc.stressFraction, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = FirePistol2.hitEffectPrefab }.Fire(); ((EntityState)this).characterBody.AddSpreadBloom(3f); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireTime * duration && !hasFired) { Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class ForcedCooldown : BaseState { public static float dur = 0.4f; public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= dur) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class Haidara : BaseState { public static float dmgCoef; public static float force; public static GameObject hitEffectPrefab; public static float radius; public static float procCoef; public static float maxDistance; public static float baseDuration; public static string muzzleString; public static GameObject projectilePrefab; private float duration; private bool hasFired; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; } public void FireThunder() { //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_001b: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_0046: 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) if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); bool crit = ((BaseState)this).RollCrit(); FireProjectileInfo val = default(FireProjectileInfo); val.position = ((EntityState)this).characterBody.transform.position; val.rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction); val.crit = crit; val.damage = dmgCoef * base.damageStat; val.owner = ((EntityState)this).gameObject; val.damageTypeOverride = (DamageType)16777216; val.projectilePrefab = projectilePrefab; ProjectileManager.instance.FireProjectile(val); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration * 0.6f && !hasFired) { hasFired = true; FireThunder(); } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class MachinePistol : BaseSkillState { public static float damageCoefficient; public static float procCoefficient; public static float baseDuration; public static float minimumDuration; public static float force; public static float recoil; public static float range; public static string muzzleString; public static string soundString; [HideInInspector] public static GameObject tracerEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/GoldGat/TracerGoldGat.prefab").WaitForCompletion(); private float fireTime; private bool hasFired; private Animator animator; private NemCaptainController ncc; private float duration => baseDuration / ((BaseState)this).attackSpeedStat; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; fireTime = 0.1f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); ncc = ((Component)((EntityState)this).characterBody).GetComponent(); } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { //IL_0045: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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_00a3: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: 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_0102: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015b: 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_016d: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_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_018a: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: 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_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; bool isCrit = ((BaseState)this).RollCrit(); if (soundString != string.Empty) { Util.PlaySound(soundString, ((EntityState)this).gameObject); } if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * recoil, -2f * recoil, -0.5f * recoil, 0.5f * recoil); new BulletAttack { bulletCount = 1u, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, damageType = (DamageType)0, falloffModel = (FalloffModel)1, maxDistance = range, force = force, hitMask = CommonMasks.bullet, minSpread = 0.2f * ncc.stressFraction, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle + ncc.stressFraction, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 0.75f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = tracerEffectPrefab, spreadPitchScale = 2f * ncc.stressFraction, spreadYawScale = 2f * ncc.stressFraction, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = FirePistol2.hitEffectPrefab }.Fire(); ((EntityState)this).characterBody.AddSpreadBloom(0.2f + 0.3f * ncc.stressFraction); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireTime) { Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { if (((EntityState)this).inputBank.skill1.down & (((EntityState)this).skillLocator.primary.stock >= 1)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new MachinePistol()); GenericSkill primary = ((EntityState)this).skillLocator.primary; primary.stock -= 1; } else { ((EntityState)this).outer.SetNextStateToMain(); } } } public override InterruptPriority GetMinimumInterruptPriority() { if (!(((EntityState)this).fixedAge <= minimumDuration)) { return (InterruptPriority)0; } return (InterruptPriority)2; } } public class Punch : BasicMeleeAttack { private bool hasPunched; public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } public override void OnMeleeHitAuthority() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)this).OnMeleeHitAuthority(); ((Component)ShakeEmitter.CreateSimpleShakeEmitter(((EntityState)this).transform.position, new Wave { amplitude = 3f, cycleOffset = 0f, frequency = 4f }, 0.25f, 20f, true)).transform.parent = ((EntityState)this).transform; } public override void AuthorityModifyOverlapAttack(OverlapAttack overlapAttack) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)this).AuthorityModifyOverlapAttack(overlapAttack); overlapAttack.damageType = (DamageType)32; } public override void FixedUpdate() { ((BasicMeleeAttack)this).FixedUpdate(); if (((EntityState)this).fixedAge >= base.duration * 0.3f && !hasPunched) { ((BasicMeleeAttack)this).BeginMeleeAttackEffect(); hasPunched = true; } if (((EntityState)this).isAuthority) { ((BasicMeleeAttack)this).AuthorityFixedUpdate(); } } } public class ReloadMachinePistol : BaseState { private bool hasReloaded; public static float baseDuration; public static string reloadEffectMuzzleString; public static GameObject reloadEffectPrefab; public static string enterSoundString; public static string exitSoundString; public static float exitSoundpitch; public static float enterSoundPitch; private Animator animator; private bool hasEjectedMag; private NemCaptainController ncc; private float duration => baseDuration / base.attackSpeedStat; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); ncc = ((Component)((EntityState)this).characterBody).GetComponent(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration * 0.8f && !hasReloaded) { Util.PlayAttackSpeedSound(enterSoundString, ((EntityState)this).gameObject, enterSoundPitch); ((EntityState)this).skillLocator.primary.stock = ((EntityState)this).skillLocator.primary.maxStock; hasReloaded = true; } if (((EntityState)this).isAuthority && !(((EntityState)this).fixedAge < duration)) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace EntityStates.NemCaptain.Weapon { public class CallDroneBase : BaseSkillState { [SerializeField] public GameObject dronePrefab; public static float baseDuration; public SetupDroneOrders.PlacementInfo placementInfo; private NemCaptainController ncc; private float duration => baseDuration / ((BaseState)this).attackSpeedStat; public override void OnEnter() { //IL_0065: 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_011d: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Debug.Log((object)"base call drone start"); ncc = ((Component)((EntityState)this).characterBody).GetComponent(); ((BaseSkillState)this).activatorSkillSlot.UnsetSkillOverride((object)((EntityState)this).gameObject, ((BaseSkillState)this).activatorSkillSlot.skillDef, (SkillOverridePriority)3); ((BaseSkillState)this).activatorSkillSlot.SetSkillOverride((object)((EntityState)this).gameObject, ncc.nullSkill, (SkillOverridePriority)1); if (((EntityState)this).isAuthority) { placementInfo = SetupDroneOrders.GetPlacementInfo(((BaseState)this).GetAimRay(), ((EntityState)this).gameObject); if (placementInfo.ok) { Debug.Log((object)"uhhh i hope this is right.. some other info: "); Debug.Log((object)("activatorSkillSlot name : " + ((Object)((BaseSkillState)this).activatorSkillSlot).name)); } } if (placementInfo.ok) { ((EntityState)this).characterBody.SetAimTimer(3f); if (NetworkServer.active && (Object)(object)dronePrefab != (Object)null) { Debug.Log((object)"deploying!"); GameObject obj = Object.Instantiate(dronePrefab, placementInfo.position, placementInfo.rotation); obj.GetComponent().teamIndex = ((EntityState)this).teamComponent.teamIndex; obj.GetComponent().ownerObject = ((EntityState)this).gameObject; if (Object.op_Implicit((Object)(object)((EntityState)this).gameObject.GetComponent())) { Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master); } NetworkServer.Spawn(((EntityState)this).gameObject); } } else { Debug.Log((object)"placement info was NOT ok... >:("); } EntityStateMachine val = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Skillswap"); if (Object.op_Implicit((Object)(object)val)) { val.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); Debug.Log((object)"base call drone exit"); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); placementInfo.Serialize(writer); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); placementInfo.Deserialize(reader); } } public class BaseDroneStrike : BaseSkillState { [SerializeField] public float dmgCoefficient; [SerializeField] public float procCoefficient; [SerializeField] public float radius; [SerializeField] public GameObject explosionPrefab; [SerializeField] public GameObject dronePrefab; [SerializeField] public float minDur = 0.2f; [SerializeField] public GameObject areaIndicator; [SerializeField] public float maxDistance = 256f; [Header("gross and hacky")] [SerializeField] public bool isFrost; [SerializeField] public bool isShock; private GameObject areaIndicatorInstance; public override void OnEnter() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.hideCrosshair = true; if (((EntityState)this).isAuthority) { areaIndicatorInstance = Object.Instantiate(areaIndicator); areaIndicatorInstance.transform.localScale = new Vector3(radius, radius, radius); } } public override void OnExit() { Util.PlaySound(CallAirstrikeBase.fireAirstrikeSoundString, ((EntityState)this).gameObject); if ((Object)(object)explosionPrefab != (Object)null) { Explode(); } if ((Object)(object)dronePrefab != (Object)null && ((EntityState)this).isAuthority) { PlaceDrone(); } ((EntityState)this).characterBody.hideCrosshair = false; if (((EntityState)this).skillLocator.primary.stock < 1) { ((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)((EntityState)this).gameObject, ((BaseSkillState)this).activatorSkillSlot.skillDef, (SkillOverridePriority)3); } if ((Object)(object)areaIndicatorInstance != (Object)null) { EntityState.Destroy((Object)(object)areaIndicatorInstance.gameObject); } ((EntityState)this).OnExit(); } public void PlaceDrone() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) RaycastHit val = default(RaycastHit); Physics.Raycast(((BaseState)this).GetAimRay(), ref val, maxDistance, LayerMask.op_Implicit(CommonMasks.bullet)); GameObject obj = Object.Instantiate(dronePrefab, ((RaycastHit)(ref val)).point, Quaternion.identity); obj.GetComponent().teamIndex = ((EntityState)this).teamComponent.teamIndex; obj.GetComponent().ownerObject = ((EntityState)this).gameObject; NetworkServer.Spawn(((EntityState)this).gameObject); } public void Explode() { //IL_000b: 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_0031: 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) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //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) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)"exploding"); RaycastHit val = default(RaycastHit); Physics.Raycast(((BaseState)this).GetAimRay(), ref val, maxDistance, LayerMask.op_Implicit(CommonMasks.bullet)); bool crit = ((BaseState)this).RollCrit(); DamageType damageType = (DamageType)32; if (isFrost) { damageType = (DamageType)256; } if (isShock) { damageType = (DamageType)16777216; } new BlastAttack { radius = radius, procCoefficient = procCoefficient, position = ((RaycastHit)(ref val)).point, attacker = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).teamComponent.teamIndex, crit = crit, baseDamage = ((EntityState)this).characterBody.damage * dmgCoefficient, damageColorIndex = (DamageColorIndex)0, falloffModel = (FalloffModel)0, attackerFiltering = (AttackerFiltering)2, damageType = damageType }.Fire(); EffectManager.SimpleEffect(explosionPrefab, ((RaycastHit)(ref val)).point, Quaternion.identity, true); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.SetAimTimer(4f); if (((EntityState)this).isAuthority) { FixedUpdateAuthority(); } } private void FixedUpdateAuthority() { if (!((EntityState)this).inputBank.skill1.down && ((EntityState)this).fixedAge > minDur) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void Update() { ((EntityState)this).Update(); UpdateAreaIndicator(); } private void UpdateAreaIndicator() { //IL_0017: 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_001d: 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_006f: 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_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { float num = 256f; Ray aimRay = ((BaseState)this).GetAimRay(); RaycastHit val = default(RaycastHit); if (Physics.Raycast(aimRay, ref val, num, LayerMask.op_Implicit(CommonMasks.bullet))) { areaIndicatorInstance.transform.position = ((RaycastHit)(ref val)).point; areaIndicatorInstance.transform.up = ((RaycastHit)(ref val)).normal; } else { areaIndicatorInstance.transform.position = ((Ray)(ref aimRay)).GetPoint(num); areaIndicatorInstance.transform.up = -((Ray)(ref aimRay)).direction; } } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class BaseSetupCallDrone : BaseSkillState { private NemCaptainController ncc; private float dur = 0.1f; private float discardDur = 0.6f; private bool hasSetPrimary; [SerializeField] public SkillDef primaryOverride; [SerializeField] public bool isRegen; [SerializeField] public bool isDiscard4Mana; [SerializeField] public bool isDampen; public override void OnEnter() { ((BaseState)this).OnEnter(); hasSetPrimary = false; ncc = ((Component)((EntityState)this).characterBody).GetComponent(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= dur * 0.5f && !((BaseSkillState)this).IsKeyDownAuthority() && !hasSetPrimary && ((EntityState)this).isAuthority) { hasSetPrimary = true; UnsetSkills(); ((EntityState)this).outer.SetNextState((EntityState)(object)new ForcedCooldown()); Debug.Log((object)"setting primary"); } if (((EntityState)this).fixedAge > discardDur && ((EntityState)this).isAuthority) { UnsetSkills(); ((EntityState)this).outer.SetNextState((EntityState)(object)new ForcedCooldown()); Util.PlaySound("ExecutionerGainCharge", ((EntityState)this).gameObject); Debug.Log((object)"discarding"); } } public void UnsetSkills() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) if (!((EntityState)this).isAuthority) { return; } EntityStateMachine val = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Skillswap"); if (Object.op_Implicit((Object)(object)val)) { val.SetNextStateToMain(); } ((BaseSkillState)this).activatorSkillSlot.UnsetSkillOverride((object)((EntityState)this).gameObject, ((BaseSkillState)this).activatorSkillSlot.skillDef, (SkillOverridePriority)3); ((BaseSkillState)this).activatorSkillSlot.SetSkillOverride((object)((EntityState)this).gameObject, ncc.nullSkill, (SkillOverridePriority)1); if (!hasSetPrimary) { return; } if (isRegen) { ((EntityState)this).characterBody.AddTimedBuffAuthority(SS2Content.Buffs.bdNemCapManaRegen.buffIndex, 15f); } if (isDampen) { ((EntityState)this).characterBody.AddTimedBuffAuthority(SS2Content.Buffs.bdNemCapManaReduction.buffIndex, 10f); } if (!isDiscard4Mana) { return; } if ((Object)(object)ncc.hand1.skillDef != (Object)(object)ncc.nullSkill) { ncc.hand1.UnsetSkillOverride((object)((EntityState)this).gameObject, ncc.hand1.skillDef, (SkillOverridePriority)3); ncc.hand1.SetSkillOverride((object)((EntityState)this).gameObject, ncc.nullSkill, (SkillOverridePriority)1); if ((Object)(object)((BaseSkillState)this).activatorSkillSlot != (Object)(object)ncc.hand1) { ncc.AddStress(-17f); } } if ((Object)(object)ncc.hand2.skillDef != (Object)(object)ncc.nullSkill) { ncc.hand2.UnsetSkillOverride((object)((EntityState)this).gameObject, ncc.hand2.skillDef, (SkillOverridePriority)3); ncc.hand2.SetSkillOverride((object)((EntityState)this).gameObject, ncc.nullSkill, (SkillOverridePriority)1); if ((Object)(object)((BaseSkillState)this).activatorSkillSlot != (Object)(object)ncc.hand2) { ncc.AddStress(-17f); } } if ((Object)(object)ncc.hand3.skillDef != (Object)(object)ncc.nullSkill) { ncc.hand3.UnsetSkillOverride((object)((EntityState)this).gameObject, ncc.hand3.skillDef, (SkillOverridePriority)3); ncc.hand3.SetSkillOverride((object)((EntityState)this).gameObject, ncc.nullSkill, (SkillOverridePriority)1); if ((Object)(object)((BaseSkillState)this).activatorSkillSlot != (Object)(object)((EntityState)this).skillLocator.utility) { ncc.AddStress(-17f); } } if ((Object)(object)ncc.hand4.skillDef != (Object)(object)ncc.nullSkill) { ncc.hand4.UnsetSkillOverride((object)((EntityState)this).gameObject, ncc.hand4.skillDef, (SkillOverridePriority)3); ncc.hand4.SetSkillOverride((object)((EntityState)this).gameObject, ncc.nullSkill, (SkillOverridePriority)1); if ((Object)(object)((BaseSkillState)this).activatorSkillSlot != (Object)(object)ncc.hand4) { ncc.AddStress(-17f); } } } public override void OnExit() { ((EntityState)this).OnExit(); if (hasSetPrimary && (Object)(object)primaryOverride != (Object)null) { ((EntityState)this).skillLocator.primary.SetSkillOverride((object)((EntityState)this).gameObject, primaryOverride, (SkillOverridePriority)3); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class DeployGravityDrone : BaseDroneStrike { } public class DeployHealDrone : BaseDroneStrike { } public class DiscardAllRestoreMana : BaseSetupCallDrone { } public class DroneStrikeBasic : BaseDroneStrike { public override void OnEnter() { base.OnEnter(); } } public class DroneStrikeFrost : BaseDroneStrike { public override void OnEnter() { base.OnEnter(); } } public class DroneStrikeTriple : BaseDroneStrike { public override void OnEnter() { base.OnEnter(); } } public class GiveManaReductionBuff : BaseSetupCallDrone { } public class GiveManaRegenBuff : BaseSetupCallDrone { } public class RecoverManaLoseCards : BaseSetupCallDrone { } public class Recycle : BaseSkillState { private NemCaptainController ncc; private float dur = 0.1f; public override void OnEnter() { ((BaseState)this).OnEnter(); ncc = ((Component)((EntityState)this).characterBody).GetComponent(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= dur && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ForcedCooldown()); } } public override void OnExit() { ((BaseSkillState)this).activatorSkillSlot.SetSkillOverride((object)((EntityState)this).gameObject, ncc.GetRandomSkillDefFromDeck(), (SkillOverridePriority)3); EntityStateMachine val = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Skillswap"); if (Object.op_Implicit((Object)(object)val)) { val.SetNextStateToMain(); } ((EntityState)this).OnExit(); } } public class SetupDroneStrike : BaseSetupCallDrone { } public class SetupDronestrikeFrost : BaseSetupCallDrone { } public class SetupDroneStrikeTriple : BaseSetupCallDrone { } public class SetupGravityDrone : BaseSetupCallDrone { } public class SetupHealDrone : BaseSetupCallDrone { } public class CallDronestrikeBase : AimThrowableBase { [SerializeField] public float airstrikeRadius; [SerializeField] public float bloom; public static GameObject muzzleflashEffect; public static string muzzleString; public static string fireDronestrikeSoundString; private NemCaptainController ncc; public override void OnEnter() { ((AimThrowableBase)this).OnEnter(); ((EntityState)this).characterBody.SetSpreadBloom(bloom, true); ncc = ((Component)((EntityState)this).characterBody).GetComponent(); EntityStateMachine val = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Skillswap"); if (Object.op_Implicit((Object)(object)val)) { val.SetNextStateToMain(); } ((BaseSkillState)this).activatorSkillSlot.UnsetSkillOverride((object)((EntityState)this).gameObject, ((BaseSkillState)this).activatorSkillSlot.skillDef, (SkillOverridePriority)3); ((BaseSkillState)this).activatorSkillSlot.SetSkillOverride((object)((EntityState)this).gameObject, ncc.nullSkill, (SkillOverridePriority)1); } public override void FixedUpdate() { ((AimThrowableBase)this).FixedUpdate(); ((EntityState)this).characterBody.SetAimTimer(4f); } public override void OnExit() { Util.PlaySound(fireDronestrikeSoundString, ((EntityState)this).gameObject); ((AimThrowableBase)this).OnExit(); } public override void ModifyProjectile(ref FireProjectileInfo fireProjectileInfo) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_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) ((AimThrowableBase)this).ModifyProjectile(ref fireProjectileInfo); fireProjectileInfo.position = base.currentTrajectoryInfo.hitPoint; fireProjectileInfo.rotation = Quaternion.Euler(0f, Random.Range(0f, 360f), 0f); ((FireProjectileInfo)(ref fireProjectileInfo)).speedOverride = 0f; } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class DroneA : CallDroneBase { public override void OnEnter() { base.OnEnter(); Debug.Log((object)"drone a!"); } } public class DroneB : CallDroneBase { public override void OnEnter() { base.OnEnter(); Debug.Log((object)"drone b!"); } } public class DroneBlackHole : CallDroneBase { public override void OnEnter() { base.OnEnter(); } } public class DroneBuff : CallDroneBase { public override void OnEnter() { base.OnEnter(); } } public class DroneC : CallDroneBase { public override void OnEnter() { base.OnEnter(); Debug.Log((object)"drone c!"); } } public class DroneD : CallDroneBase { public override void OnEnter() { base.OnEnter(); Debug.Log((object)"drone d!"); } } public class DroneDiscard : BaseSkillState { public static GameObject projectilePrefab; public static float damageCoefficient; public static float procCoefficient; public static float projectileSpeed; public static float baseDuration; public static float recoil; public static string muzzleString; private NemCaptainController ncc; private float duration; private float shotDur; private int shotsToFire; private int timesFired; private float timer; public override void OnEnter() { ((BaseState)this).OnEnter(); ncc = ((EntityState)this).GetComponent(); SkillDef[] obj = new SkillDef[4] { ncc.hand1.skillDef, ncc.hand2.skillDef, ncc.hand3.skillDef, ncc.hand4.skillDef }; shotsToFire = 0; SkillDef[] array = (SkillDef[])(object)obj; for (int i = 0; i < array.Length; i++) { if ((Object)(object)array[i] != (Object)(object)ncc.nullSkill) { shotsToFire++; } } duration = baseDuration * (float)shotsToFire / ((BaseState)this).attackSpeedStat; shotDur = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(duration * 1.2f); timesFired = 0; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); timer += Time.fixedDeltaTime; if (timer >= shotDur && timesFired < shotsToFire && ((EntityState)this).isAuthority) { timer = 0f; timesFired++; } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public virtual void FireDrone() { //IL_005e: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { _ = damageCoefficient; _ = ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * recoil); ((BaseState)this).GetAimRay(); Debug.Log((object)"fired shot :D"); } } public override void OnExit() { ncc.DiscardCardsAndReplace(); ((EntityState)this).OnExit(); } } public class DroneE : CallDroneBase { public override void OnEnter() { base.OnEnter(); Debug.Log((object)"drone e!"); } } public class DroneF : CallDroneBase { public override void OnEnter() { base.OnEnter(); Debug.Log((object)"drone f!"); } } public class DroneFrostStrike : CallDronestrikeBase { public override void OnEnter() { base.OnEnter(); } } public class DroneG : CallDroneBase { public override void OnEnter() { base.OnEnter(); Debug.Log((object)"drone g!"); } } public class DroneH : CallDroneBase { public override void OnEnter() { base.OnEnter(); Debug.Log((object)"drone h!"); } } public class DroneHeal : CallDroneBase { public override void OnEnter() { base.OnEnter(); } } public class DroneStrike : CallDronestrikeBase { public override void OnEnter() { base.OnEnter(); } } public class SetupDroneOrders : BaseState { public struct PlacementInfo { public bool ok; public Vector3 position; public Quaternion rotation; public void Serialize(NetworkWriter writer) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) writer.Write(ok); writer.Write(position); writer.Write(rotation); } public void Deserialize(NetworkReader reader) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) ok = reader.ReadBoolean(); position = reader.ReadVector3(); rotation = reader.ReadQuaternion(); } } public static GameObject crosshairOverridePrefab; public static string enterSoundString; public static string exitSoundString; public static GameObject effectMuzzlePrefab; public static string effectMuzzleString; public static float baseExitDuration; public static float maxPlacementDistance; public static GameObject blueprintPrefab; public static float normalYThreshold; public PlacementInfo currentPlacementInfo; private OverrideRequest crosshairOverrideRequest; private GenericSkill primarySkillSlot; private AimAnimator modelAimAnimator; private GameObject effectMuzzleInstance; private Animator modelAnimator; private float timerSinceComplete; private bool beginExit; private GenericSkill originalPrimarySkill; private GenericSkill originalSecondarySkill; private GenericSkill originalUtilitySkill; private GenericSkill originalSpecialSkill; private BlueprintController blueprints; private AimRequest aimRequest; private NemCaptainController ncc; private float exitDuration => baseExitDuration / base.attackSpeedStat; public override void OnEnter() { ((BaseState)this).OnEnter(); modelAnimator = ((EntityState)this).GetModelAnimator(); ncc = ((Component)((EntityState)this).characterBody).GetComponent(); Debug.Log((object)"setting drone orders..."); Object.op_Implicit((Object)(object)crosshairOverridePrefab); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { aimRequest = ((EntityState)this).cameraTargetParams.RequestAimType((AimType)2); } originalPrimarySkill = ((EntityState)this).skillLocator.primary; Debug.Log((object)("originalPrimarySkill : " + ((Object)((EntityState)this).skillLocator.primary).name)); originalSecondarySkill = ((EntityState)this).skillLocator.secondary; Debug.Log((object)("originalSecondarySkill : " + ((Object)((EntityState)this).skillLocator.secondary).name)); originalUtilitySkill = ((EntityState)this).skillLocator.utility; Debug.Log((object)("originalUtilitySkill : " + ((Object)((EntityState)this).skillLocator.utility).name)); originalSpecialSkill = ((EntityState)this).skillLocator.special; Debug.Log((object)("originalSpecialSkill : " + ((Object)((EntityState)this).skillLocator.special).name)); ncc.cachedPrimary = ((EntityState)this).skillLocator.primary.skillDef; Debug.Log((object)("cachedPrimaryDef : " + ((EntityState)this).skillLocator.primary.skillDef.skillNameToken)); Debug.Log((object)"stored original skills"); ((EntityState)this).skillLocator.primary = ncc.hand1; ((EntityState)this).skillLocator.secondary = ncc.hand2; ((EntityState)this).skillLocator.utility = ncc.hand3; ((EntityState)this).skillLocator.special = ncc.hand4; Debug.Log((object)("hand1 : " + ((Object)ncc.hand1).name)); Debug.Log((object)("hand2 : " + ((Object)ncc.hand2).name)); Debug.Log((object)("hand3 : " + ((Object)ncc.hand3).name)); Debug.Log((object)("hand4 : " + ((Object)ncc.hand4).name)); ((EntityState)this).skillLocator.primary.stock = 0; ((EntityState)this).skillLocator.secondary.stock = 0; ((EntityState)this).skillLocator.utility.stock = 0; ((EntityState)this).skillLocator.special.stock = 0; } public static PlacementInfo GetPlacementInfo(Ray aimRay, GameObject gameObject) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: 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_0024: 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_002a: 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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //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) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) float num = 0f; CameraRigController.ModifyAimRayIfApplicable(aimRay, gameObject, ref num); Vector3 val = -((Ray)(ref aimRay)).direction; Vector3 val2 = Vector3.up; Vector3 val3 = Vector3.Cross(val2, val); PlacementInfo result = default(PlacementInfo); result.ok = false; RaycastHit val4 = default(RaycastHit); if (Physics.Raycast(aimRay, ref val4, maxPlacementDistance, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)) && ((RaycastHit)(ref val4)).normal.y > normalYThreshold) { val2 = ((RaycastHit)(ref val4)).normal; val = Vector3.Cross(val3, val2); result.ok = true; } result.rotation = Util.QuaternionSafeLookRotation(val, val2); Vector3 point = ((RaycastHit)(ref val4)).point; result.position = point; return result; } public override void Update() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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) ((EntityState)this).Update(); currentPlacementInfo = GetPlacementInfo(((BaseState)this).GetAimRay(), ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)blueprints)) { blueprints.PushState(currentPlacementInfo.position, currentPlacementInfo.rotation, currentPlacementInfo.ok); } } public override void FixedUpdate() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { CharacterDirection characterDirection = ((EntityState)this).characterDirection; Ray aimRay = ((BaseState)this).GetAimRay(); characterDirection.moveVector = ((Ray)(ref aimRay)).direction; } if (((EntityState)this).isAuthority && beginExit) { timerSinceComplete += Time.fixedDeltaTime; if (timerSinceComplete >= exitDuration) { ((EntityState)this).outer.SetNextStateToMain(); } } } public override void OnExit() { Debug.Log((object)"exiting drone orders!"); if (((EntityState)this).outer.destroying) { Util.PlaySound(exitSoundString, ((EntityState)this).gameObject); } OverrideRequest val = crosshairOverrideRequest; if (val != null) { val.Dispose(); } ((EntityState)this).skillLocator.primary = originalPrimarySkill; ((EntityState)this).skillLocator.secondary = originalSecondarySkill; ((EntityState)this).skillLocator.utility = originalUtilitySkill; ((EntityState)this).skillLocator.special = originalSpecialSkill; Debug.Log((object)"reset skills"); if (Object.op_Implicit((Object)(object)blueprints)) { EntityState.Destroy((Object)(object)((Component)blueprints).gameObject); blueprints = null; } AimRequest val2 = aimRequest; if (val2 != null) { val2.Dispose(); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } } namespace EntityStates.NemBandit { public class NemEnterReload : BaseState { public static float baseDuration; public static string enterSoundString; private float duration => baseDuration / base.attackSpeedStat; public override void OnEnter() { ((BaseState)this).OnEnter(); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new NemReload()); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class NemReload : BaseState { public static float enterSoundPitch; public static float exitSoundPitch; public static string enterSoundString; public static string exitSoundString; public static GameObject reloadEffectPrefab; public static string reloadEffectMuzzleString; public static float baseDuration; private bool hasGivenStock; private float duration => baseDuration / base.attackSpeedStat; public override void OnEnter() { ((BaseState)this).OnEnter(); Util.PlayAttackSpeedSound(enterSoundString, ((EntityState)this).gameObject, enterSoundPitch); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration / 2f) { GiveStock(); } if (((EntityState)this).isAuthority && !(((EntityState)this).fixedAge < duration)) { if (((EntityState)this).skillLocator.primary.stock < ((EntityState)this).skillLocator.primary.maxStock) { ((EntityState)this).outer.SetNextState((EntityState)(object)new NemReload()); return; } Util.PlayAttackSpeedSound(exitSoundString, ((EntityState)this).gameObject.gameObject, exitSoundPitch); ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } private void GiveStock() { if (!hasGivenStock) { ((EntityState)this).skillLocator.primary.AddOneStock(); hasGivenStock = true; } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class NemRevolver : BaseSkillState { public static float damageCoefficient; public static float procCoefficient; public static float baseDuration; public static float minimumDuration; public static float force; public static float recoil; public static float range; public static string muzzleString; public static string soundString; [HideInInspector] public static GameObject tracerEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/TracerBanditPistol.prefab").WaitForCompletion(); private float fireTime; private bool hasFired; private Animator animator; private float duration => baseDuration / ((BaseState)this).attackSpeedStat; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; fireTime = 0.1f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { //IL_0045: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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_00a3: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: 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_00f6: 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_010e: 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_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0138: 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_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: 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_0172: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; bool isCrit = ((BaseState)this).RollCrit(); if (soundString != string.Empty) { Util.PlaySound(soundString, ((EntityState)this).gameObject); } if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * recoil, -2f * recoil, -0.5f * recoil, 0.5f * recoil); new BulletAttack { bulletCount = 1u, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, damageType = (DamageType)0, falloffModel = (FalloffModel)1, maxDistance = range, force = force, hitMask = CommonMasks.bullet, minSpread = 0f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 0.75f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = tracerEffectPrefab, spreadPitchScale = 1f, spreadYawScale = 1f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = FirePistol2.hitEffectPrefab }.Fire(); ((EntityState)this).characterBody.AddSpreadBloom(0.3f); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireTime) { Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { if (((EntityState)this).inputBank.skill1.down & (((EntityState)this).skillLocator.primary.stock >= 1)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new NemRevolver()); GenericSkill primary = ((EntityState)this).skillLocator.primary; primary.stock -= 1; } else { ((EntityState)this).outer.SetNextStateToMain(); } } } public override InterruptPriority GetMinimumInterruptPriority() { if (!(((EntityState)this).fixedAge <= minimumDuration)) { return (InterruptPriority)0; } return (InterruptPriority)2; } } public class OctocamoTest : BaseState { public override void OnEnter() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Debug.Log((object)"skill activated"); CharacterModel component = ((Component)((EntityState)this).characterBody.modelLocator.modelTransform).GetComponent(); Debug.Log((object)component); RaycastHit val = default(RaycastHit); if (Physics.Raycast(((EntityState)this).characterBody.transform.position, Vector3.down, ref val, 4f)) { Material material = ((Renderer)((Component)((RaycastHit)(ref val)).collider).GetComponentInParent()).material; component.baseRendererInfos[1].defaultMaterial = material; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= 0.2f && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } } } namespace EntityStates.MULE { public class MULEAimNet : BaseState { public static GameObject projectilePrefab; public static float baseDuration; public static float damageCoefficient; public static string enterSoundString; public static string muzzleName; public static GameObject muzzleFlashprefab; private float duration; private GameObject projectileInstance; private ProjectileImpactExplosion pie; private ProjectileDamage pd; public override void OnEnter() { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); ((EntityState)this).PlayCrossfade("Gesture, Override", "ShootNet", 0.05f); projectileInstance = projectilePrefab; Debug.Log((object)("projectile instance: " + projectileInstance)); projectileInstance.AddComponent().Add(NetOnHit.netDamageType); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); FireProjectileInfo val = default(FireProjectileInfo); val.crit = ((BaseState)this).RollCrit(); val.damage = damageCoefficient * base.damageStat; val.damageColorIndex = (DamageColorIndex)0; val.force = 0f; val.owner = ((EntityState)this).gameObject; val.position = ((Ray)(ref aimRay)).origin; val.procChainMask = default(ProcChainMask); val.projectilePrefab = projectileInstance; val.rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction); val.useSpeedOverride = false; FireProjectileInfo val2 = val; ProjectileManager.instance.FireProjectile(val2); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } } public class MULEAirSlam : BaseSkillState { public float charge; public static float minDamageCoefficient; public static float maxDamageCoefficient; public static float minRadius; public static float maxRadius; public static float baseDuration; public static string muzzleString; public static GameObject slamEffectVFX; public static GameObject projectilePrefab; public static float waveProjectileArc; public static int waveProjectileCount; public static float waveProjectileDamageCoefficient; public static float waveProjectileForce; private Animator animator; private float duration; private float radius; private float fireDuration; private bool hasFired; private float damageCoefficient; private ChildLocator childLocator; private ProjectileController pc; private ProjectileOverlapAttack poa; private float ogmass; public override void OnEnter() { //IL_006c: 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_0153: 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_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Expected O, but got Unknown Debug.Log((object)("Air Slamming " + charge)); ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); childLocator = ((EntityState)this).GetModelChildLocator(); hasFired = false; duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetBuffCount(SS2Content.Buffs.bdHiddenSlow20.buffIndex, 0); damageCoefficient = Util.Remap(charge, 0f, 1f, minDamageCoefficient, maxDamageCoefficient); radius = Util.Remap(charge, 0f, 1f, minRadius, maxRadius); fireDuration = 0.25f * duration; if (!((BaseState)this).isGrounded) { ogmass = ((EntityState)this).characterMotor.mass; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.mass *= 30f; ((EntityState)this).PlayCrossfade("FullBody, Override", "SlamAir", "Primary.playbackRate", duration, 0.05f); ((EntityState)this).PlayCrossfade("Gesture, Override", "BufferEmpty", "Primary.playbackRate", duration, 0.05f); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); ((EntityState)this).characterMotor.onHitGroundAuthority += new HitGroundDelegate(GroundSlam); } } public override void OnExit() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0044: 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_004b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); ((EntityState)this).PlayCrossfade("FullBody, Override", "SlamLand", "Primary.playbackRate", duration, 0.05f); ((EntityState)this).characterMotor.onHitGroundAuthority -= new HitGroundDelegate(GroundSlam); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags - 1); ((EntityState)this).characterMotor.mass = ogmass; } private void GroundSlam(ref HitGroundInfo hitGroundInfo) { //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_0018: 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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) bool crit = ((BaseState)this).RollCrit(); BlastAttack val = new BlastAttack { radius = radius, procCoefficient = 1f, position = childLocator.FindChild(muzzleString).position, attacker = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).teamComponent.teamIndex, crit = crit, baseDamage = damageCoefficient * ((BaseState)this).damageStat + 2f, damageColorIndex = (DamageColorIndex)0, falloffModel = (FalloffModel)0, attackerFiltering = (AttackerFiltering)2, damageType = (DamageType)0, impactEffect = Headbutt.hitEffectPrefab.GetComponent() }; EffectManager.SimpleMuzzleFlash(slamEffectVFX, ((EntityState)this).gameObject, muzzleString, true); val.Fire(); if (charge >= 1f) { FireShockwaves(); } ((EntityState)this).outer.SetNextStateToMain(); } private void FireShockwaves() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_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_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) pc = projectilePrefab.GetComponent(); poa = projectilePrefab.GetComponent(); GameObject waveProjectilePrefab = WeaponSlam.waveProjectilePrefab; ProjectileController component = waveProjectilePrefab.GetComponent(); ProjectileOverlapAttack component2 = waveProjectilePrefab.GetComponent(); pc.flightSoundLoop = component.flightSoundLoop; poa.impactEffect = component2.impactEffect; Transform val = ((BaseState)this).FindModelChild(muzzleString); float num = waveProjectileArc / (float)waveProjectileCount; Vector3 val2 = Vector3.ProjectOnPlane(((EntityState)this).characterDirection.forward, Vector3.up); Vector3 val3 = ((EntityState)this).characterBody.footPosition; if (Object.op_Implicit((Object)(object)val)) { val3 = val.position; } for (int i = 0; i < waveProjectileCount; i++) { Vector3 val4 = Quaternion.AngleAxis(num * ((float)i - (float)waveProjectileCount / 2f), Vector3.up) * val2; ProjectileManager.instance.FireProjectile(projectilePrefab, val3, Util.QuaternionSafeLookRotation(val4), ((EntityState)this).gameObject, ((BaseState)this).damageStat * waveProjectileDamageCoefficient, waveProjectileForce, Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class MULEChargeJump : BaseSkillState { public static float baseChargeDuration = 1.25f; private float chargeDuration; private float debuffTimer; private Animator animator; public override void OnEnter() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); chargeDuration = baseChargeDuration / ((BaseState)this).attackSpeedStat; animator = ((EntityState)this).GetModelAnimator(); ((EntityState)this).characterBody.SetBuffCount(SS2Content.Buffs.bdHiddenSlow20.buffIndex, 0); PlayAnimation(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); float num = CalcCharge(); if (!((BaseState)this).isGrounded) { ((EntityState)this).outer.SetNextStateToMain(); } debuffTimer += ((EntityState)this).fixedAge; if (debuffTimer >= chargeDuration * 0.2f) { debuffTimer = 0f; if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.AddBuff(SS2Content.Buffs.bdHiddenSlow20); } } ((EntityState)this).characterBody.SetSpreadBloom(Util.Remap(num, 0f, 1f, 0f, 3f), true); ((BaseState)this).StartAimMode(2f, false); if (((EntityState)this).isAuthority && (num >= 1f || (!((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= 0.01f))) { Debug.Log((object)("Released at: " + num)); MULEJump mULEJump = new MULEJump(); mULEJump.charge = num; ((EntityState)this).outer.SetNextState((EntityState)(object)mULEJump); } } public void PlayAnimation() { } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); } public override void OnExit() { Debug.Log((object)"Exiting!"); ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class MULEChargePunch : BaseSkillState { public static float baseChargeDuration = 0.5f; public static float minSpinCount; public static float maxSpinCount; public static float duration = 0.5f; private float chargeDuration; private Animator animator; private ChildLocator childLocator; private string spinFXmuzzle = "SpinFXArm"; private GameObject spinFX; public float spinCount; public override void OnEnter() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); spinCount += 1f; chargeDuration = baseChargeDuration / ((BaseState)this).attackSpeedStat; animator = ((EntityState)this).GetModelAnimator(); childLocator = ((EntityState)this).GetModelChildLocator(); spinFX = ((Component)childLocator.FindChild(spinFXmuzzle)).gameObject; if (Object.op_Implicit((Object)(object)spinFX)) { spinFX.SetActive(true); } ((EntityState)this).characterBody.SetBuffCount(SS2Content.Buffs.bdHiddenSlow20.buffIndex, 0); ((EntityState)this).PlayCrossfade("Gesture, Override", "ChargePunch", "Secondary.playbackRate", duration, 0.05f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); float num = CalcCharge(); ((EntityState)this).characterBody.SetSpreadBloom(Util.Remap(num, 0f, 1f, 0f, 3f), true); ((BaseState)this).StartAimMode(2f, false); if (!((EntityState)this).isAuthority || !(num >= 1f)) { return; } if (((EntityState)this).inputBank.skill2.down && spinCount < maxSpinCount) { Debug.Log((object)("Charge Another " + spinCount)); MULEChargePunch mULEChargePunch = new MULEChargePunch(); mULEChargePunch.spinCount = spinCount; ((EntityState)this).outer.SetNextState((EntityState)(object)mULEChargePunch); return; } Debug.Log((object)("Punching " + spinCount)); if (Object.op_Implicit((Object)(object)spinFX)) { spinFX.SetActive(false); } MULEStunPunch mULEStunPunch = new MULEStunPunch(); mULEStunPunch.spinCount = spinCount; ((EntityState)this).outer.SetNextState((EntityState)(object)mULEStunPunch); } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } public override void OnExit() { Debug.Log((object)"Exiting!"); if (Object.op_Implicit((Object)(object)spinFX)) { spinFX.SetActive(false); } ((EntityState)this).OnExit(); } } public class MULEChargeSlam : BaseSkillState { public static float baseChargeDuration = 1.25f; private float chargeDuration; private float debuffTimer; private Animator animator; public int swingSide; private bool hasAnimated; private bool maxCharge; public static string maxChargeSound; public override void OnEnter() { ((BaseState)this).OnEnter(); hasAnimated = false; chargeDuration = baseChargeDuration / ((BaseState)this).attackSpeedStat; animator = ((EntityState)this).GetModelAnimator(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); float num = CalcCharge(); if (num >= 0.01f && !hasAnimated) { hasAnimated = true; PlayAnimation(); } if (num >= 1f) { num = 1f; if (!maxCharge) { maxCharge = true; Util.PlaySound(maxChargeSound, ((EntityState)this).gameObject); } } ((EntityState)this).characterBody.SetSpreadBloom(Util.Remap(num, 0f, 1f, 0f, 3f), true); ((BaseState)this).StartAimMode(2f, false); if (!((EntityState)this).isAuthority || !(((EntityState)this).fixedAge >= 0.01f)) { return; } if (!((BaseSkillState)this).IsKeyDownAuthority()) { Debug.Log((object)"Key released"); MULESpinFling mULESpinFling = new MULESpinFling(); mULESpinFling.charge = num; ((EntityState)this).outer.SetNextState((EntityState)(object)mULESpinFling); return; } if (((EntityState)this).inputBank.skill1.down) { if (num < 1f && ((BaseState)this).isGrounded) { Debug.Log((object)("Normal Slam " + num)); MULESlam mULESlam = new MULESlam(); mULESlam.charge = num; ((EntityState)this).outer.SetNextState((EntityState)(object)mULESlam); return; } if (num >= 1f && ((BaseState)this).isGrounded) { Debug.Log((object)("Max Slam " + num)); MULESuperSlam mULESuperSlam = new MULESuperSlam(); mULESuperSlam.charge = num; ((EntityState)this).outer.SetNextState((EntityState)(object)mULESuperSlam); return; } if (!((BaseState)this).isGrounded) { Debug.Log((object)("Air Slam " + num)); MULEAirSlam mULEAirSlam = new MULEAirSlam(); mULEAirSlam.charge = num; ((EntityState)this).outer.SetNextState((EntityState)(object)mULEAirSlam); return; } } if (((EntityState)this).inputBank.jump.down && ((BaseState)this).isGrounded) { Debug.Log((object)("Released at: " + num)); MULEJump mULEJump = new MULEJump(); mULEJump.charge = num; ((EntityState)this).outer.SetNextState((EntityState)(object)mULEJump); } Debug.Log((object)("Released at: " + num)); } public void PlayAnimation() { ((EntityState)this).PlayCrossfade("Gesture, Override", "ChargeSlam", "Primary.playbackRate", chargeDuration, 0.1f); } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); } public override void OnExit() { Debug.Log((object)"Exiting!"); ((BaseSkillState)this).activatorSkillSlot.DeductStock(1); ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class MULEJump : BaseSkillState { public float charge; public static float minJumpCoefficient; public static float maxJumpCoefficient; public static float baseDuration; private Animator animator; private float jumpCoefficient; private float duration; private ChildLocator childLocator; public override void OnEnter() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)("Jumping " + charge)); ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); childLocator = ((EntityState)this).GetModelChildLocator(); duration = baseDuration / ((BaseState)this).moveSpeedStat; ((EntityState)this).characterBody.SetBuffCount(SS2Content.Buffs.bdHiddenSlow20.buffIndex, 0); jumpCoefficient = Util.Remap(charge, 0f, 1f, minJumpCoefficient, maxJumpCoefficient); CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += Vector3.down * ((BaseState)this).moveSpeedStat * 25f; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, jumpCoefficient); ((EntityState)this).PlayCrossfade("FullBody, Override", "Jump", "Secondary.playbackRate", duration, 0.05f); } 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; } } internal class MULEPunch : BasicMeleeAttack, IStepSetter { [TokenModifier(/*Could not decode attribute arguments.*/)] public static float dmgCoefficient; public static float swingTimeCoefficient = 1.33f; public int swingSide; public float spinCount = 1f; public override void OnEnter() { Debug.Log((object)"Punching"); base.damageCoefficient = dmgCoefficient; ((BasicMeleeAttack)this).OnEnter(); base.animator = ((EntityState)this).GetModelAnimator(); base.hitEffectPrefab = Headbutt.hitEffectPrefab; } public override void PlayAnimation() { string text = ((swingSide == 0) ? "Punch1" : "Punch2"); ((EntityState)this).PlayCrossfade("Gesture, Override", text, "Secondary.playbackRate", base.duration, 0.1f); } void IStepSetter.SetStep(int i) { swingSide = i; base.swingEffectMuzzleString = ((swingSide == 0) ? "SwingLeft" : "SwingRight"); } public override void OnSerialize(NetworkWriter writer) { ((EntityState)this).OnSerialize(writer); writer.Write((byte)swingSide); } public override void OnDeserialize(NetworkReader reader) { ((EntityState)this).OnDeserialize(reader); swingSide = reader.ReadByte(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } public override void AuthorityModifyOverlapAttack(OverlapAttack overlapAttack) { ((BasicMeleeAttack)this).AuthorityModifyOverlapAttack(overlapAttack); } } public class MULESlam : BaseSkillState { public float charge; public static float minDamageCoefficient; public static float maxDamageCoefficient; public static float minRadius; public static float maxRadius; public static float baseDuration; public static string muzzleString; public static GameObject slamEffectVFX; private Animator animator; private float duration; private float radius; private float fireDuration; private bool hasFired; private float damageCoefficient; private ChildLocator childLocator; public override void OnEnter() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)("Slamming " + charge)); ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); childLocator = ((EntityState)this).GetModelChildLocator(); hasFired = false; duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetBuffCount(SS2Content.Buffs.bdHiddenSlow20.buffIndex, 0); damageCoefficient = Util.Remap(charge, 0f, 1f, minDamageCoefficient, maxDamageCoefficient); radius = Util.Remap(charge, 0f, 1f, minRadius, maxRadius); fireDuration = 0.25f * duration; if (charge >= 0.45f) { ((EntityState)this).PlayCrossfade("FullBody, Override", "SlamHeavy", "Primary.playbackRate", duration, 0.05f); } else { ((EntityState)this).PlayCrossfade("FullBody, Override", "SlamLight", "Primary.playbackRate", duration, 0.05f); } ((EntityState)this).PlayCrossfade("Gesture, Override", "BufferEmpty", "Primary.playbackRate", duration, 0.05f); } public override void OnExit() { ((EntityState)this).OnExit(); } private void GroundSlam() { //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_0018: 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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_008c: 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_0097: 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) bool crit = ((BaseState)this).RollCrit(); new BlastAttack { radius = radius, procCoefficient = 1f, position = childLocator.FindChild(muzzleString).position, attacker = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).teamComponent.teamIndex, crit = crit, baseDamage = damageCoefficient * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, falloffModel = (FalloffModel)0, attackerFiltering = (AttackerFiltering)2, damageType = (DamageType)0, impactEffect = Headbutt.hitEffectPrefab.GetComponent() }.Fire(); EffectManager.SimpleMuzzleFlash(slamEffectVFX, ((EntityState)this).gameObject, muzzleString, true); } public override void FixedUpdate() { //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) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterMotor.velocity = Vector3.zero; if (((EntityState)this).fixedAge >= fireDuration && !hasFired) { hasFired = true; GroundSlam(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } internal class MULESpin : BasicMeleeAttack { [TokenModifier(/*Could not decode attribute arguments.*/)] public static float dmgCoefficient; public static float minSpinCount; public static float maxSpinCount; public static float swingTimeCoefficient = 1f; public static float duration = 0.3f; public int spinCount; private string spinFXmuzzle = "SpinFX"; private ChildLocator childLocator; private float ogCDScale; private GameObject spinFX; public override void OnEnter() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) spinCount++; Debug.Log((object)("spinCount: " + spinCount)); ((EntityState)this).characterBody.AddTimedBuffAuthority(SS2Content.Buffs.bdHiddenSpeed5.buffIndex, 0.5f + (float)(spinCount / 3)); ((EntityState)this).characterBody.RecalculateStats(); base.damageCoefficient = dmgCoefficient; duration /= ((BaseState)this).attackSpeedStat; if (duration <= 0.125f) { duration = 0.125f; } childLocator = ((EntityState)this).GetModelChildLocator(); if (!((BaseState)this).isGrounded) { if (spinCount == 1) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 15f); } else { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 2.5f); } } spinFX = ((Component)childLocator.FindChild(spinFXmuzzle)).gameObject; if (Object.op_Implicit((Object)(object)spinFX)) { spinFX.SetActive(true); } ((BasicMeleeAttack)this).OnEnter(); base.animator = ((EntityState)this).GetModelAnimator(); if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.SetBuffCount(Buffs.SmallArmorBoost.buffIndex, 1); } base.hitEffectPrefab = Headbutt.hitEffectPrefab; } public override void PlayAnimation() { ((EntityState)this).PlayCrossfade("Gesture, Override", "Spin", "Utility.playbackRate", duration, 0.1f); } public override void FixedUpdate() { //IL_0113: 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) ((BasicMeleeAttack)this).FixedUpdate(); if (!(((EntityState)this).fixedAge >= duration) || !((EntityState)this).isAuthority) { return; } if (((EntityState)this).isAuthority && ((float)spinCount < minSpinCount || ((float)spinCount < maxSpinCount && ((EntityState)this).inputBank.skill3.down))) { MULESpin mULESpin = new MULESpin(); mULESpin.spinCount = spinCount; mULESpin.ogCDScale = ogCDScale; ((EntityState)this).outer.SetNextState((EntityState)(object)mULESpin); } else if (((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); ((EntityState)this).skillLocator.utility.DeductStock(1); ((EntityState)this).PlayCrossfade("Gesture, Override", "CancelSpin", "Utility.playbackRate", duration, 0.1f); if ((float)spinCount > minSpinCount) { GenericSkill utility = ((EntityState)this).skillLocator.utility; utility.rechargeStopwatch -= ((float)spinCount - minSpinCount) / 2f; } if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.SetBuffCount(SS2Content.Buffs.bdHiddenSlow20.buffIndex, 0); ((EntityState)this).characterBody.SetBuffCount(Buffs.SmallArmorBoost.buffIndex, 0); } if (Object.op_Implicit((Object)(object)spinFX)) { spinFX.SetActive(false); } } } public override void OnExit() { ((BasicMeleeAttack)this).OnExit(); } public override void AuthorityModifyOverlapAttack(OverlapAttack overlapAttack) { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)this).AuthorityModifyOverlapAttack(overlapAttack); if ((float)spinCount <= maxSpinCount - 1f) { overlapAttack.forceVector *= -1f; overlapAttack.pushAwayForce *= -1f; } else { overlapAttack.forceVector *= 2f; overlapAttack.pushAwayForce *= 2f; } overlapAttack.damageType = (DamageType)32; } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class MULESpinFling : BaseSkillState { public static float baseDamageCoefficient; public static float minDuration; public static float maxDuration; private float duration; public float charge; public static float airControl; private float previousAirControl; public static float minUpwardVelocity; public static float maxUpwardVelocity; private float upwardVelocity; public static float minForwardVelocity; public static float maxForwardVelocity; private float forwardVelocity; public static float knockbackForce; public static float minimumY; public static float aimVelocity; private Vector3 dashVector = Vector3.zero; private bool hasFlung; public override void OnEnter() { //IL_0045: 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_004c: 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) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0138: 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_0141: 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_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = Util.Remap(charge, 0f, 1f, minDuration, maxDuration) / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.hideCrosshair = true; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); previousAirControl = ((EntityState)this).characterMotor.airControl; ((EntityState)this).characterMotor.airControl = airControl; Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; upwardVelocity = Util.Remap(charge, 0f, 1f, minUpwardVelocity, maxUpwardVelocity); forwardVelocity = Util.Remap(charge, 0f, 1f, minForwardVelocity, maxForwardVelocity); if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.isSprinting = true; direction.y = Mathf.Max(direction.y, minimumY); Vector3 val = ((Vector3)(ref direction)).normalized * aimVelocity * ((BaseState)this).moveSpeedStat; Vector3 val2 = Vector3.up * upwardVelocity; Vector3 val3 = new Vector3(direction.x, 0f, direction.z); Vector3 val4 = ((Vector3)(ref val3)).normalized * forwardVelocity; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(); ((EntityState)this).characterMotor.velocity = val + val2 + val4; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { FixedUpdateAuthority(); } } public void FixedUpdateAuthority() { if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0024: 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_002c: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).characterBody.isSprinting = false; ((EntityState)this).characterMotor.airControl = previousAirControl; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); ((EntityState)this).OnExit(); } } internal class MULESpinStart : BaseSkillState { [TokenModifier(/*Could not decode attribute arguments.*/)] public static float swingTimeCoefficient = 1f; public static float duration = 0.2f; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).PlayCrossfade("Gesture, Override", "Startpin", "Utility.playbackRate", duration, 0.1f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { MULESpin nextState = new MULESpin(); ((EntityState)this).outer.SetNextState((EntityState)(object)nextState); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } internal class MULEStunPunch : BasicMeleeAttack, IStepSetter { [TokenModifier(/*Could not decode attribute arguments.*/)] public static float dmgCoefficient; public static float swingTimeCoefficient = 1.33f; public int swingSide; public float spinCount = 1f; public override void OnEnter() { Debug.Log((object)"Stun Punching"); base.damageCoefficient = dmgCoefficient * spinCount; ((BasicMeleeAttack)this).OnEnter(); base.animator = ((EntityState)this).GetModelAnimator(); base.hitEffectPrefab = Headbutt.hitEffectPrefab; base.pushAwayForce *= spinCount; base.forceForwardVelocity = false; ((EntityState)this).characterBody.skillLocator.secondary.DeductStock(1); if (spinCount > 1f) { GenericSkill secondary = ((EntityState)this).skillLocator.secondary; secondary.rechargeStopwatch -= spinCount - 1f; } } public override void PlayAnimation() { string text = ((swingSide == 0) ? "Punch1" : "Punch2"); ((EntityState)this).PlayCrossfade("Gesture, Override", text, "Secondary.playbackRate", base.duration, 0.1f); } void IStepSetter.SetStep(int i) { swingSide = i; base.swingEffectMuzzleString = ((swingSide == 0) ? "SwingLeft" : "SwingRight"); } public override void OnSerialize(NetworkWriter writer) { ((EntityState)this).OnSerialize(writer); writer.Write((byte)swingSide); } public override void OnDeserialize(NetworkReader reader) { ((EntityState)this).OnDeserialize(reader); swingSide = reader.ReadByte(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } public override void AuthorityModifyOverlapAttack(OverlapAttack overlapAttack) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)this).AuthorityModifyOverlapAttack(overlapAttack); overlapAttack.damageType = (DamageType)32; } } public class MULESuperSlam : BaseSkillState { public float charge; public static float damageCoefficient; public static float minRadius; public static float maxRadius; public static float baseDuration; public static string muzzleString; public static GameObject slamEffectVFX; public static GameObject projectilePrefab; public static float waveProjectileArc; public static int waveProjectileCount; public static float waveProjectileDamageCoefficient; public static float waveProjectileForce; private Animator animator; private float duration; private float radius; private float fireDuration; private bool hasFired; private ChildLocator childLocator; private ProjectileController pc; private ProjectileOverlapAttack poa; public override void OnEnter() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)("Super Slamming " + charge)); ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); childLocator = ((EntityState)this).GetModelChildLocator(); hasFired = false; duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetBuffCount(SS2Content.Buffs.bdHiddenSlow20.buffIndex, 0); radius = Util.Remap(charge, 0f, 1f, minRadius, maxRadius); fireDuration = 0.25f * duration; ((EntityState)this).PlayCrossfade("FullBody, Override", "SlamComedic", "Primary.playbackRate", duration, 0.05f); ((EntityState)this).PlayCrossfade("Gesture, Override", "BufferEmpty", "Primary.playbackRate", duration, 0.05f); } public override void OnExit() { ((EntityState)this).OnExit(); } private void GroundSlam() { //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_0018: 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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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) bool crit = ((BaseState)this).RollCrit(); new BlastAttack { radius = radius, procCoefficient = 1f, position = childLocator.FindChild(muzzleString).position, attacker = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).teamComponent.teamIndex, crit = crit, baseDamage = damageCoefficient * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, falloffModel = (FalloffModel)0, attackerFiltering = (AttackerFiltering)2, damageType = (DamageType)0, impactEffect = Headbutt.hitEffectPrefab.GetComponent() }.Fire(); EffectManager.SimpleMuzzleFlash(slamEffectVFX, ((EntityState)this).gameObject, muzzleString, true); FireShockwaves(); } private void FireShockwaves() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_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_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) pc = projectilePrefab.GetComponent(); poa = projectilePrefab.GetComponent(); GameObject waveProjectilePrefab = WeaponSlam.waveProjectilePrefab; ProjectileController component = waveProjectilePrefab.GetComponent(); ProjectileOverlapAttack component2 = waveProjectilePrefab.GetComponent(); pc.flightSoundLoop = component.flightSoundLoop; poa.impactEffect = component2.impactEffect; Transform val = ((BaseState)this).FindModelChild(muzzleString); float num = waveProjectileArc / (float)waveProjectileCount; Vector3 val2 = Vector3.ProjectOnPlane(((EntityState)this).characterDirection.forward, Vector3.up); Vector3 val3 = ((EntityState)this).characterBody.footPosition; if (Object.op_Implicit((Object)(object)val)) { val3 = val.position; } for (int i = 0; i < waveProjectileCount; i++) { Vector3 val4 = Quaternion.AngleAxis(num * ((float)i - (float)waveProjectileCount / 2f), Vector3.up) * val2; ProjectileManager.instance.FireProjectile(projectilePrefab, val3, Util.QuaternionSafeLookRotation(val4), ((EntityState)this).gameObject, ((BaseState)this).damageStat * waveProjectileDamageCoefficient, waveProjectileForce, Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f); } } public override void FixedUpdate() { //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) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterMotor.velocity = Vector3.zero; if (((EntityState)this).fixedAge >= fireDuration && !hasFired) { hasFired = true; GroundSlam(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class Mario2Jump : GenericCharacterMain { public bool delayedInputReceived; public float charge; public float jumpCharge; public override void ProcessJump() { //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Expected O, but got Unknown //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Expected O, but got Unknown //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Expected O, but got Unknown if (((EntityState)this).inputBank.jump.down && ((EntityState)this).characterMotor.isGrounded) { base.jumpInputReceived = false; delayedInputReceived = true; charge += 1f; } else if (delayedInputReceived) { delayedInputReceived = false; if (((EntityState)this).characterMotor.isGrounded) { if (charge > 24f) { charge = 24f; } charge /= 24f; jumpCharge = Util.Remap(charge, 0f, 1f, 1f, 2.4f); charge = 0f; base.jumpInputReceived = true; } } if (!((BaseCharacterMain)this).hasCharacterMotor) { return; } bool flag = false; bool flag2 = false; if (!base.jumpInputReceived || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody) || ((EntityState)this).characterMotor.jumpCount >= ((EntityState)this).characterBody.maxJumpCount) { return; } int itemCount = ((EntityState)this).characterBody.inventory.GetItemCount(Items.JumpBoost); float num = 1f; float num2 = 1f; if (((EntityState)this).characterMotor.jumpCount >= ((EntityState)this).characterBody.baseJumpCount) { flag = true; num = 1.5f; num2 = 1.5f; } else if ((float)itemCount > 0f && ((EntityState)this).characterBody.isSprinting) { float num3 = ((EntityState)this).characterBody.acceleration * ((EntityState)this).characterMotor.airControl; if (((EntityState)this).characterBody.moveSpeed > 0f && num3 > 0f) { flag2 = true; float num4 = Mathf.Sqrt(10f * (float)itemCount / num3); float num5 = ((EntityState)this).characterBody.moveSpeed / num3; num = (num4 + num5) / num5; } } GenericCharacterMain.ApplyJumpVelocity(((EntityState)this).characterMotor, ((EntityState)this).characterBody, num, num2 * jumpCharge, false); jumpCharge = 1f; if (((BaseCharacterMain)this).hasModelAnimator) { int layerIndex = ((BaseCharacterMain)this).modelAnimator.GetLayerIndex("Body"); if (layerIndex >= 0) { if (((EntityState)this).characterMotor.jumpCount == 0 || ((EntityState)this).characterBody.baseJumpCount == 1) { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("Jump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } else { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("BonusJump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } } } if (flag) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load("Prefabs/Effects/FeatherEffect"), new EffectData { origin = ((EntityState)this).characterBody.footPosition }, true); } else if (((EntityState)this).characterMotor.jumpCount > 0) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load("Prefabs/Effects/ImpactEffects/CharacterLandImpact"), new EffectData { origin = ((EntityState)this).characterBody.footPosition, scale = ((EntityState)this).characterBody.radius }, true); } if (flag2) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load("Prefabs/Effects/BoostJumpEffect"), new EffectData { origin = ((EntityState)this).characterBody.footPosition, rotation = Util.QuaternionSafeLookRotation(((EntityState)this).characterMotor.velocity) }, true); } CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.jumpCount++; } } } namespace EntityStates.LampBoss { public class BuffNearby : BaseState { public static float baseDuration; private float duration; public static GameObject buffWard; public static GameObject blueBuffWard; private GameObject wardInstance; public static GameObject chargingVFX; public static GameObject chargingVFXBlue; public static GameObject explosionVFX; public static GameObject explosionBlueVFX; public static float baseDamageCoefficient = 2f; public static float forceCoefficient = 400f; public static float procCoefficient = 1f; public static float radius = 10f; private bool hasBuffed; private Animator animator; public static string mecanimParameter; private float timer; private bool isBlue; public override void OnEnter() { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); hasBuffed = false; animator = ((EntityState)this).GetModelAnimator(); duration = baseDuration / base.attackSpeedStat; hasBuffed = false; isBlue = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken == "SS2_SKIN_LAMP_BLUE"; if (Object.op_Implicit((Object)(object)(isBlue ? chargingVFXBlue : chargingVFX))) { new EffectData { origin = ((EntityState)this).characterBody.corePosition, rootObject = ((Component)((EntityState)this).GetModelChildLocator().FindChild("Chest")).gameObject }; } ((EntityState)this).PlayCrossfade("FullBody, Override", "SecondaryBuff", "Secondary.playbackRate", duration, 0.05f); } public override void FixedUpdate() { //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: 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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0102: 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_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0122: 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) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (animator.GetFloat(mecanimParameter) >= 0.5f && !hasBuffed) { hasBuffed = true; GameObject val = (isBlue ? blueBuffWard : buffWard); GameObject val2 = (isBlue ? explosionBlueVFX : explosionVFX); if (((EntityState)this).isAuthority) { wardInstance = Object.Instantiate(val); wardInstance.GetComponent().teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex; wardInstance.GetComponent().AttachToGameObjectAndSpawn(((EntityState)this).gameObject, (string)null); } bool crit = ((BaseState)this).RollCrit(); new BlastAttack { radius = radius, procCoefficient = procCoefficient, position = ((EntityState)this).characterBody.corePosition, attacker = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).teamComponent.teamIndex, baseForce = forceCoefficient, crit = crit, baseDamage = ((EntityState)this).characterBody.damage * baseDamageCoefficient, damageColorIndex = (DamageColorIndex)0, falloffModel = (FalloffModel)0, attackerFiltering = (AttackerFiltering)2 }.Fire(); if (Object.op_Implicit((Object)(object)val2)) { EffectManager.SimpleEffect(val2, ((EntityState)this).characterBody.corePosition, Quaternion.identity, true); } Util.PlayAttackSpeedSound("LampBullet", ((EntityState)this).gameObject, ((EntityState)this).characterBody.attackSpeed); } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class FireOrbs : BaseSkillState { public static float damageCoefficient; public static float recoil; public static float projectileSpeed; public static float baseDuration; public static string mecanimPerameter; public static float baseTimeBetweenShots; public static GameObject projectilePrefab; public static GameObject blueProjectilePrefab; public static string muzzleString; public static float maxOrbCount; private float orbCount; private float timer; private float duration; private float timeBetweenShots; private Transform muzzle; private Animator animator; private Ray aimRay; private GameObject projectile; public override void OnEnter() { //IL_0065: 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) ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(duration * 1.5f); duration = baseDuration / ((BaseState)this).attackSpeedStat; timeBetweenShots = baseTimeBetweenShots / ((BaseState)this).attackSpeedStat; muzzle = ((EntityState)this).GetModelChildLocator().FindChild(muzzleString); animator = ((EntityState)this).GetModelAnimator(); aimRay = ((BaseState)this).GetAimRay(); bool flag = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken == "SS2_SKIN_LAMP_BLUE"; projectile = (flag ? blueProjectilePrefab : projectilePrefab); Util.PlayAttackSpeedSound("WayfarerAttack", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); ((EntityState)this).PlayCrossfade("FullBody, Override", "HoldLamp", "Primary.playbackRate", duration, 0.05f); } public virtual void FireProjectile() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) aimRay = ((BaseState)this).GetAimRay(); float num = damageCoefficient * ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * recoil); Vector3 val = Quaternion.Euler(Random.Range(-18.5f, 18.5f), Random.Range(-2.5f, 22.5f), 0f) * ((Ray)(ref aimRay)).direction; ProjectileManager.instance.FireProjectile(projectile, muzzle.position, Util.QuaternionSafeLookRotation(val), ((EntityState)this).gameObject, num, 20f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); timer += Time.fixedDeltaTime; if (animator.GetFloat("RaiseLamp") >= 0.5f && orbCount < maxOrbCount && timer >= baseTimeBetweenShots / ((BaseState)this).attackSpeedStat) { orbCount += 1f; timer = 0f; if (((EntityState)this).isAuthority) { FireProjectile(); } } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class LampBossDeath : GenericCharacterDeath { public static GameObject deathVFX; public static GameObject deathVFXblue; public static GameObject initialVFX; public static GameObject initialVFXblue; public static float duration; public static string mecanimPerameter; private float timer; private Animator animator; private bool hasPlayedEffect; public static string muzzleString; private GameObject particles; private Transform muzzle; private bool isBlue; public override void OnEnter() { ((GenericCharacterDeath)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); ((EntityState)this).PlayCrossfade("FullBody, Override", "BufferEmpty", 0.01f); muzzle = ((EntityState)this).GetModelChildLocator().FindChild(muzzleString); Util.PlaySound("WayfarerVO", ((EntityState)this).gameObject); hasPlayedEffect = false; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((Behaviour)((EntityState)this).characterMotor).enabled = false; } isBlue = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken == "SS2_SKIN_LAMP_BLUE"; } public override void FixedUpdate() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterDeath)this).FixedUpdate(); if (animator.GetFloat(mecanimPerameter) > 0.5f || (((EntityState)this).fixedAge > 2.7f && !hasPlayedEffect && NetworkServer.active)) { hasPlayedEffect = true; GameObject val = (isBlue ? deathVFXblue : deathVFX); Util.PlaySound("WayfarerDeath", ((EntityState)this).gameObject); if (NetworkServer.active) { EffectManager.SimpleEffect(val, muzzle.position, muzzle.rotation, true); } if (Object.op_Implicit((Object)(object)((GenericCharacterDeath)this).cachedModelTransform)) { EntityState.Destroy((Object)(object)((Component)((GenericCharacterDeath)this).cachedModelTransform).gameObject); ((GenericCharacterDeath)this).cachedModelTransform = null; } ((GenericCharacterDeath)this).DestroyBodyAsapServer(); ((GenericCharacterDeath)this).DestroyModel(); EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } public override void OnExit() { ((GenericCharacterDeath)this).OnExit(); } } public class LampBossSpawn : GenericCharacterSpawnState { public static GameObject spawnVFX; public static GameObject spawnVFXblue; public static string muzzleString; private Transform muzzle; private EffectData effectData; public override void OnEnter() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0092: 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_00a7: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterSpawnState)this).OnEnter(); muzzle = ((EntityState)this).GetModelChildLocator().FindChild(muzzleString); GameObject obj = ((((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken == "SS2_SKIN_LAMP_BLUE") ? spawnVFXblue : spawnVFX); Util.PlaySound("WayfarerSpawn", ((EntityState)this).gameObject); EffectManager.SimpleEffect(obj, new Vector3(muzzle.position.x, muzzle.position.y + 10f, muzzle.position.z), muzzle.rotation, true); } } public class TurnInvis : BaseState { public static float baseDuration; private float duration; private bool hasBuffed; private Animator animator; public static string mecanimParameter; private float timer; public float blinkDistance = 18f; public GameObject particles; private Vector3 blinkDestination = Vector3.zero; private BullseyeSearch enemySearch; public static SpawnCard spawnCard; private float summonTimer; private int summonCount; public static float summonInterval = 0.6f; public static int maxSummonCount = 5; public override void OnEnter() { ((BaseState)this).OnEnter(); hasBuffed = false; animator = ((EntityState)this).GetModelAnimator(); duration = baseDuration / base.attackSpeedStat; ((Component)((BaseState)this).FindModelChild("GlowParticles")).gameObject.SetActive(true); CalculateBlinkDestination(); ((EntityState)this).PlayCrossfade("FullBody, Override", "SecondaryBuff", "Secondary.playbackRate", duration, 0.05f); } public override void FixedUpdate() { //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: 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) ((EntityState)this).FixedUpdate(); summonTimer += Time.fixedDeltaTime; if (NetworkServer.active && summonTimer > 0f && summonCount < maxSummonCount) { summonCount++; summonTimer -= summonInterval; if (((EntityState)this).isAuthority) { SummonFollower(); } } if (animator.GetFloat(mecanimParameter) >= 0.5f && !hasBuffed) { hasBuffed = true; ((Component)((BaseState)this).FindModelChild("GlowParticles")).gameObject.SetActive(false); SetPosition(blinkDestination); ((EntityState)this).characterBody.AddTimedBuffAuthority(Buffs.Cloak.buffIndex, 8f); ((EntityState)this).characterBody.AddTimedBuffAuthority(Buffs.CloakSpeed.buffIndex, 8f); } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void SetPosition(Vector3 newPosition) { //IL_0018: 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) if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPositionAndRotation(newPosition, Quaternion.identity, true); } } private void CalculateBlinkDestination() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //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_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: 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_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_00d5: 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_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_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_0114: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector3.zero; Ray aimRay = ((BaseState)this).GetAimRay(); BullseyeSearch val2 = new BullseyeSearch { searchOrigin = ((Ray)(ref aimRay)).origin, searchDirection = ((Ray)(ref aimRay)).direction, maxDistanceFilter = blinkDistance, teamMaskFilter = TeamMask.allButNeutral, filterByLoS = false }; ((TeamMask)(ref val2.teamMaskFilter)).RemoveTeam((TeamIndex)1); val2.sortMode = (SortMode)2; val2.RefreshCandidates(); HurtBox val3 = val2.GetResults().FirstOrDefault(); if (Object.op_Implicit((Object)(object)val3)) { val = ((Component)val3).transform.position - ((EntityState)this).transform.position; } blinkDestination = ((EntityState)this).transform.position; NodeGraph groundNodes = SceneInfo.instance.groundNodes; NodeIndex val4 = groundNodes.FindClosestNode(((EntityState)this).transform.position + val, ((EntityState)this).characterBody.hullClassification, float.PositiveInfinity); groundNodes.GetNodePosition(val4, ref blinkDestination); blinkDestination += ((EntityState)this).transform.position - ((EntityState)this).characterBody.footPosition; ((EntityState)this).characterDirection.forward = val; } private void SummonFollower() { //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_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_0030: 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_004c: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown Transform coreTransform = ((EntityState)this).characterBody.coreTransform; if (!Object.op_Implicit((Object)(object)coreTransform)) { return; } DirectorSpawnRequest val = new DirectorSpawnRequest(spawnCard, new DirectorPlacementRule { placementMode = (PlacementMode)1, minDistance = 3f, maxDistance = 20f, spawnOnTarget = coreTransform }, RoR2Application.rng); val.summonerBodyObject = ((EntityState)this).gameObject; val.onSpawnedServer = (Action)Delegate.Combine(val.onSpawnedServer, (Action)delegate(SpawnResult spawnResult) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) if (spawnResult.success && Object.op_Implicit((Object)(object)spawnResult.spawnedInstance) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { Inventory component = spawnResult.spawnedInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.CopyEquipmentFrom(((EntityState)this).characterBody.inventory); } } }); DirectorCore instance = DirectorCore.instance; if (!((Object)(object)instance == (Object)null)) { instance.TrySpawnObject(val); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } } namespace EntityStates.Lamp { public class FireOrb : BaseSkillState { public static float damageCoefficient; public static float recoil; public static float projectileSpeed; public static float baseDuration; public static string mecanimPeramater; public static GameObject projectilePrefab; public static GameObject blueProjectilePrefab; public static string muzzleString; private float duration; private bool hasFired; private Transform muzzle; private Animator animator; private float originalMoveSpeed; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(duration * 1.5f); duration = baseDuration / ((BaseState)this).attackSpeedStat; muzzle = ((EntityState)this).GetModelChildLocator().FindChild(muzzleString); animator = ((EntityState)this).GetModelAnimator(); hasFired = false; originalMoveSpeed = ((EntityState)this).characterBody.moveSpeed; ((EntityState)this).PlayCrossfade("Body", "Attack", "Primary.playbackRate", duration, 0.05f); } public virtual void FireProjectile() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) float num = damageCoefficient * ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * recoil); Ray aimRay = ((BaseState)this).GetAimRay(); GameObject val = ((((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken == "SS2_SKIN_LAMP_BLUE") ? blueProjectilePrefab : projectilePrefab); Util.PlayAttackSpeedSound("LampBullet", ((EntityState)this).gameObject, ((EntityState)this).characterBody.attackSpeed); ProjectileManager.instance.FireProjectile(val, muzzle.position, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, num, 30f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.moveSpeed = originalMoveSpeed * 0.5f; if (animator.GetFloat("Fire") >= 0.5f && !hasFired) { hasFired = true; if (((EntityState)this).isAuthority) { FireProjectile(); } } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).characterBody.moveSpeed = originalMoveSpeed; } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class FriendSearch : BaseSkillState { public static float duration = 0.6f; public static float radius = 12f; public static string muzzleString = "Muzzle"; private SphereSearch sphereSearch; public override void OnEnter() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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) //IL_004b: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); if (((EntityState)this).isAuthority) { sphereSearch = new SphereSearch(); sphereSearch.origin = ((EntityState)this).transform.position; sphereSearch.mask = ((LayerIndex)(ref LayerIndex.enemyBody)).mask; sphereSearch.queryTriggerInteraction = (QueryTriggerInteraction)2; sphereSearch.radius = radius; } } public void Search() { List list = CollectionPool>.RentCollection(); sphereSearch.ClearCandidates(); sphereSearch.RefreshCandidates(); sphereSearch.FilterCandidatesByColliderEntities(); sphereSearch.OrderCandidatesByDistance(); sphereSearch.FilterCandidatesByDistinctColliderEntities(); sphereSearch.GetColliders(list); List list2 = new List(); foreach (Collider item in list) { GameObject gameObject = ((Component)((Component)item).transform.parent).gameObject; list2.Add(gameObject); } } } public class HealBeam : BaseSkillState { public static float baseDuration; private float duration; public static float healCoefficient = 5f; public static GameObject healBeamPrefab; public static GameObject healBeamPrefabBlue; public HurtBox target; private HealBeamController healBeamController; private float lineWidthRefVelocity; private bool isBlue; private float originalMoveSpeed; public override void OnEnter() { //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_00a6: Expected O, but got Unknown //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_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).PlayCrossfade("Body", "IdleBuff", 0.3f); originalMoveSpeed = ((EntityState)this).characterBody.moveSpeed; isBlue = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken == "SS2_SKIN_LAMP_BLUE"; duration = baseDuration / ((BaseState)this).attackSpeedStat; float healRate = healCoefficient * ((BaseState)this).damageStat / duration; Ray aimRay = ((BaseState)this).GetAimRay(); Transform val = ((BaseState)this).FindModelChild("Muzzle"); if (NetworkServer.active) { BullseyeSearch val2 = new BullseyeSearch(); val2.teamMaskFilter = TeamMask.none; if (Object.op_Implicit((Object)(object)((EntityState)this).teamComponent)) { ((TeamMask)(ref val2.teamMaskFilter)).AddTeam(((EntityState)this).teamComponent.teamIndex); } val2.filterByLoS = false; val2.maxDistanceFilter = 25f; val2.maxAngleFilter = 180f; val2.searchOrigin = ((Ray)(ref aimRay)).origin; val2.searchDirection = ((Ray)(ref aimRay)).direction; val2.sortMode = (SortMode)2; val2.RefreshCandidates(); val2.FilterOutGameObject(((EntityState)this).gameObject); target = val2.GetResults().FirstOrDefault(); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)target) && !target.healthComponent.body.hasCloakBuff && target.healthComponent.body.bodyIndex != BodyCatalog.FindBodyIndex("LampBody")) { Util.PlaySound("FollowerCast", ((EntityState)this).gameObject); GameObject val3 = Object.Instantiate(isBlue ? healBeamPrefabBlue : healBeamPrefab, val); healBeamController = val3.GetComponent(); healBeamController.healRate = healRate; healBeamController.target = target; healBeamController.ownership.ownerObject = ((EntityState)this).gameObject; NetworkServer.Spawn(((EntityState)this).gameObject); target.healthComponent.body.AddTimedBuff(SS2Content.Buffs.bdLampBuff.buffIndex, duration); } else { ((BaseSkillState)this).activatorSkillSlot.AddOneStock(); ((EntityState)this).outer.SetNextStateToMain(); } } } public override void OnExit() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)healBeamController)) { healBeamController.BreakServer(); } ((EntityState)this).characterBody.moveSpeed = originalMoveSpeed; if (Object.op_Implicit((Object)(object)target) && NetworkServer.active) { target.healthComponent.body.RemoveBuff(SS2Content.Buffs.bdLampBuff.buffIndex); } ((EntityState)this).OnExit(); ((EntityState)this).PlayCrossfade("Body", "Idle", 0.3f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.moveSpeed = originalMoveSpeed * 0.1f; if ((((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) || (((EntityState)this).fixedAge >= duration * 0.05f && !target.healthComponent.alive)) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } public override void OnSerialize(NetworkWriter writer) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnSerialize(writer); HurtBoxReference val = HurtBoxReference.FromHurtBox(target); ((HurtBoxReference)(ref val)).Write(writer); } public override void OnDeserialize(NetworkReader reader) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnDeserialize(reader); HurtBoxReference val = default(HurtBoxReference); ((HurtBoxReference)(ref val)).Read(reader); GameObject val2 = ((HurtBoxReference)(ref val)).ResolveGameObject(); target = (((Object)(object)val2 != (Object)null) ? val2.GetComponent() : null); } } public class LampDeath : GenericCharacterDeath { public static GameObject deathVFX; public static GameObject deathVFXblue; public static float duration; public static string mecanimPerameter; private float timer; private Animator animator; private bool hasPlayedEffect; public static string muzzleString; private Transform muzzle; private bool isBlue; public override void OnEnter() { ((GenericCharacterDeath)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); ((EntityState)this).PlayCrossfade("Body", "Death", "deathPlaybackRate", duration, 0.05f); muzzle = ((EntityState)this).GetModelChildLocator().FindChild(muzzleString); hasPlayedEffect = false; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((Behaviour)((EntityState)this).characterMotor).enabled = false; } isBlue = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken == "SS2_SKIN_LAMP_BLUE"; } public void DestroyLamp() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) hasPlayedEffect = true; EffectManager.SimpleEffect(isBlue ? deathVFXblue : deathVFX, muzzle.position, muzzle.rotation, true); Util.PlaySound("LampImpact", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)((GenericCharacterDeath)this).cachedModelTransform)) { EntityState.Destroy((Object)(object)((Component)((GenericCharacterDeath)this).cachedModelTransform).gameObject); ((GenericCharacterDeath)this).cachedModelTransform = null; } ((GenericCharacterDeath)this).DestroyBodyAsapServer(); ((GenericCharacterDeath)this).DestroyModel(); EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority && !hasPlayedEffect) { DestroyLamp(); } if (Object.op_Implicit((Object)(object)animator) && animator.GetFloat(mecanimPerameter) > 0.5f && !hasPlayedEffect) { DestroyLamp(); } } } public class LampSpawn : GenericCharacterSpawnState { public static GameObject spawnVFX; public static GameObject spawnVFXblue; public static string muzzleString; private Transform muzzle; private EffectData effectData; public override void OnEnter() { //IL_005b: 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_0081: 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_0096: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterSpawnState)this).OnEnter(); muzzle = ((EntityState)this).GetModelChildLocator().FindChild(muzzleString); EffectManager.SimpleEffect((((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken == "SS2_SKIN_LAMP_BLUE") ? spawnVFXblue : spawnVFX, new Vector3(muzzle.position.x, muzzle.position.y + 3f, muzzle.position.z), muzzle.rotation, true); } } } namespace EntityStates.Knight { public class LeapInit : BasicMeleeAttack { public static float swingTimeCoefficient; public static float airControl; private float previousAirControl; public static float upwardVelocity; public static float forwardVelocity; public static float knockbackForce; public static float minimumY; public static float aimVelocity; public bool swingSide; public float totalSwings; public static float baseSwingCount = 4f; public float swingCount; public override void OnEnter() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003f: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007f: 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) //IL_0090: 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_009f: 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_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: 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_00e1: 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_00e3: 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_00ea: 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) ((BasicMeleeAttack)this).OnEnter(); swingCount = baseSwingCount * ((BaseState)this).attackSpeedStat; totalSwings += 1f; base.animator = ((EntityState)this).GetModelAnimator(); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.isSprinting = true; direction.y = Mathf.Max(direction.y, minimumY); Vector3 val = ((Vector3)(ref direction)).normalized * aimVelocity * ((BaseState)this).moveSpeedStat; Vector3 val2 = Vector3.up * upwardVelocity; Vector3 val3 = new Vector3(direction.x, 0f, direction.z); Vector3 val4 = ((Vector3)(ref val3)).normalized * forwardVelocity; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(); ((EntityState)this).characterMotor.velocity = val + val2 + val4; } } public override void PlayAnimation() { string text = (swingSide ? "SwingSword1" : "SwingSword2"); ((EntityState)this).PlayCrossfade("Gesture, Override", text, "Primary.playbackRate", base.duration * swingTimeCoefficient, 0.05f); } public override void OnExit() { if (totalSwings < baseSwingCount) { LeapSlash2 leapSlash = new LeapSlash2(); leapSlash.totalSwings = totalSwings; leapSlash.swingCount = swingCount; leapSlash.swingSide = !swingSide; ((EntityState)this).outer.SetNextState((EntityState)(object)leapSlash); } ((BasicMeleeAttack)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class LeapSlash : BaseState { public static float baseDamageCoefficient; public static float baseDuration; private float duration; public static float airControl; private float previousAirControl; public static float upwardVelocity; public static float forwardVelocity; public static float knockbackForce; public static float minimumY; public static float aimVelocity; public static float baseDurationBetweenSwings; private float durationBetweenSwings; public static float baseSwingCount; private float totalSwings; public static float radius; private float swingCount; public float stopwatchBetweenSwings; public static GameObject beamProjectile; private Animator animator; public static float hitPauseDuration; public static float shorthopVelocityFromHit; protected float hitPauseTimer; protected Vector3 storedHitPauseVelocity; public static GameObject swingEffectPrefab; public static string swingSoundString; public static string swingEffectMuzzleString; private GameObject swingEffectInstance; private BlastAttack blastAttack; private bool swingSide; protected bool authorityInHitPause => hitPauseTimer > 0f; public override void OnEnter() { //IL_0048: 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_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: 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_00d8: 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_00e1: 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_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_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_013d: Expected O, but got Unknown //IL_015c: 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_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: 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_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: 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_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); duration = baseDuration; durationBetweenSwings = baseDurationBetweenSwings / base.attackSpeedStat; swingCount = baseSwingCount * base.attackSpeedStat; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); previousAirControl = ((EntityState)this).characterMotor.airControl; ((EntityState)this).characterMotor.airControl = airControl; Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; blastAttack = new BlastAttack { attacker = ((EntityState)this).gameObject, attackerFiltering = (AttackerFiltering)2, baseDamage = baseDamageCoefficient * base.damageStat, baseForce = -500f, bonusForce = Vector3.zero, crit = ((BaseState)this).RollCrit(), damageColorIndex = (DamageColorIndex)0, damageType = (DamageType)0, falloffModel = (FalloffModel)0, inflictor = ((EntityState)this).gameObject, losType = (LoSType)0, position = ((EntityState)this).characterBody.corePosition, procChainMask = default(ProcChainMask), procCoefficient = 1f, radius = radius, teamIndex = ((BaseState)this).GetTeam() }; if (((EntityState)this).isAuthority) { Swing(); ((EntityState)this).characterBody.isSprinting = true; direction.y = Mathf.Max(direction.y, minimumY); Vector3 val = ((Vector3)(ref direction)).normalized * aimVelocity * base.moveSpeedStat; Vector3 val2 = Vector3.up * upwardVelocity; Vector3 val3 = new Vector3(direction.x, 0f, direction.z); Vector3 val4 = ((Vector3)(ref val3)).normalized * forwardVelocity; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(); ((EntityState)this).characterMotor.velocity = val + val2 + val4; } } protected virtual void BeginMeleeAttackEffect() { Util.PlaySound(swingSoundString, ((EntityState)this).gameObject); if (!Object.op_Implicit((Object)(object)swingEffectPrefab)) { return; } Transform val = ((BaseState)this).FindModelChild(swingEffectMuzzleString); if (Object.op_Implicit((Object)(object)val)) { swingEffectInstance = Object.Instantiate(swingEffectPrefab, val); ScaleParticleSystemDuration component = swingEffectInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.newDuration = component.initialDuration; } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatchBetweenSwings += Time.fixedDeltaTime; if (stopwatchBetweenSwings >= durationBetweenSwings && totalSwings < swingCount) { Debug.Log((object)"Swinging"); stopwatchBetweenSwings -= durationBetweenSwings; Swing(); totalSwings += 1f; } if (((EntityState)this).isAuthority) { AuthorityFixedUpdate(); } if (totalSwings == swingCount || ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void AuthorityFixedUpdate() { //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) if (authorityInHitPause) { hitPauseTimer -= Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } ((EntityState)this).fixedAge = ((EntityState)this).fixedAge - Time.fixedDeltaTime; if (!authorityInHitPause) { AuthorityExitHitPause(); } } } protected virtual void AuthorityExitHitPause() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_0050: Unknown result type (might be due to invalid IL or missing references) hitPauseTimer = 0f; storedHitPauseVelocity.y = Mathf.Max(storedHitPauseVelocity.y, shorthopVelocityFromHit / Mathf.Sqrt(base.attackSpeedStat)); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = storedHitPauseVelocity; } storedHitPauseVelocity = Vector3.zero; if (Object.op_Implicit((Object)(object)animator)) { animator.speed = 1f; } } private void AuthorityTriggerHitPause() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { storedHitPauseVelocity += ((EntityState)this).characterMotor.velocity; ((EntityState)this).characterMotor.velocity = Vector3.zero; } if (Object.op_Implicit((Object)(object)animator)) { animator.speed = 0f; } hitPauseTimer = hitPauseDuration / base.attackSpeedStat; } private void Swing() { //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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_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) if (((EntityState)this).isAuthority) { blastAttack.position = ((BaseState)this).FindModelChild(swingEffectMuzzleString).position; if (blastAttack.Fire().hitCount > 0) { Util.PlaySound(GroundLight.hitSoundString, ((EntityState)this).gameObject); AuthorityTriggerHitPause(); } BeginMeleeAttackEffect(); string text = (swingSide ? "SwingSword1" : "SwingSword2"); ((EntityState)this).PlayCrossfade("Gesture, Override", text, "Primary.playbackRate", durationBetweenSwings, 0.02f); swingSide = !swingSide; if (((EntityState)this).characterBody.HasBuff(SS2Content.Buffs.bdKnightBuff) && ((EntityState)this).isAuthority) { ProjectileManager instance = ProjectileManager.instance; GameObject obj = beamProjectile; Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 origin = ((Ray)(ref aimRay)).origin; aimRay = ((BaseState)this).GetAimRay(); instance.FireProjectile(obj, origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, base.damageStat * baseDamageCoefficient, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, 80f); } } } public override void OnExit() { //IL_0018: 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_0020: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).characterMotor.airControl = previousAirControl; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); if (authorityInHitPause) { AuthorityExitHitPause(); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class LeapSlash2 : BasicMeleeAttack { public static float swingTimeCoefficient; public bool swingSide; public float totalSwings; public float swingCount; public override void OnEnter() { ((BasicMeleeAttack)this).OnEnter(); totalSwings += 1f; base.animator = ((EntityState)this).GetModelAnimator(); } public override void OnExit() { if (totalSwings < swingCount) { LeapSlash2 leapSlash = new LeapSlash2(); leapSlash.totalSwings = totalSwings; leapSlash.swingCount = swingCount; leapSlash.swingSide = !swingSide; ((EntityState)this).outer.SetNextState((EntityState)(object)leapSlash); } ((BasicMeleeAttack)this).OnExit(); } public override void PlayAnimation() { string text = (swingSide ? "SwingSword1" : "SwingSword2"); ((EntityState)this).PlayCrossfade("Gesture, Override", text, "Primary.playbackRate", base.duration * swingTimeCoefficient, 0.05f); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } internal class Parry : BasicMeleeAttack { public static float swingTimeCoefficient = 1f; public int swingSide; [TokenModifier(/*Could not decode attribute arguments.*/)] public static float TokenModifier_dmgCoefficient => ((BasicMeleeAttack)new ShieldPunch()).damageCoefficient; public override void OnEnter() { ((BasicMeleeAttack)this).OnEnter(); ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); ((EntityState)this).characterBody.AddBuff(SS2Content.Buffs.bdKnightCharged); base.animator = ((EntityState)this).GetModelAnimator(); } public override void PlayAnimation() { ((EntityState)this).PlayCrossfade("Gesture, Override", "Parry", "Secondary.playbackRate", base.duration * swingTimeCoefficient, 0.15f); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } public override void OnExit() { if (((EntityState)this).inputBank.skill2.down) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Shield()); } ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); ((BasicMeleeAttack)this).OnExit(); } public override void AuthorityModifyOverlapAttack(OverlapAttack overlapAttack) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)this).AuthorityModifyOverlapAttack(overlapAttack); overlapAttack.damageType = (DamageType)32; } } public class Shield : BaseState { public static BuffDef shieldBuff; public static BuffDef parryBuff; public static float parryDur; public static float minDur; public static SkillDef skillDef; private bool hasParried; private float stopwatch; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); ((EntityState)this).PlayCrossfade("Gesture, Override", "RaiseShield", 0.1f); animator.SetBool("shieldUp", true); ((EntityState)this).characterBody.SetAimTimer(0.5f); ((EntityState)this).characterBody.AddBuff(shieldBuff); ((EntityState)this).skillLocator.primary.SetSkillOverride((object)((EntityState)this).skillLocator.primary, skillDef, (SkillOverridePriority)4); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= 0.075f && !hasParried) { hasParried = true; ((EntityState)this).characterBody.AddTimedBuff(parryBuff, parryDur); } stopwatch += ((EntityState)this).fixedAge; if (stopwatch >= 0.25f) { stopwatch = 0f; ((EntityState)this).characterBody.SetAimTimer(0.5f); } if (((EntityState)this).fixedAge >= minDur && !((EntityState)this).inputBank.skill2.down) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); animator.SetBool("shieldUp", false); ((EntityState)this).characterBody.RemoveBuff(shieldBuff); ((EntityState)this).characterBody.SetAimTimer(0.5f); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } internal class ShieldPunch : BasicMeleeAttack { public static float swingTimeCoefficient = 1f; [TokenModifier(/*Could not decode attribute arguments.*/)] public static GameObject beamProjectile; public static GameObject bigBeamProjectile; private GameObject beam; public int swingSide; private bool hasFiredBeam; public static float TokenModifier_dmgCoefficient => ((BasicMeleeAttack)new ShieldPunch()).damageCoefficient; public override void OnEnter() { ((BasicMeleeAttack)this).OnEnter(); ((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)((EntityState)this).skillLocator.primary, Shield.skillDef, (SkillOverridePriority)4); base.animator = ((EntityState)this).GetModelAnimator(); } public override void FixedUpdate() { //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: 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_00ba: Unknown result type (might be due to invalid IL or missing references) if (base.animator.GetFloat(base.mecanimHitboxActiveParameter) > 0.5f && ((EntityState)this).fixedAge >= base.duration * 0.1f && ((EntityState)this).isAuthority && !hasFiredBeam) { hasFiredBeam = true; float num = ((BaseState)this).damageStat * base.damageCoefficient * 2f; beam = beamProjectile; if (((EntityState)this).characterBody.HasBuff(SS2Content.Buffs.bdKnightCharged)) { num *= 1.5f; beam = bigBeamProjectile; } ProjectileManager instance = ProjectileManager.instance; GameObject obj = beam; Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 origin = ((Ray)(ref aimRay)).origin; aimRay = ((BaseState)this).GetAimRay(); instance.FireProjectile(obj, origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, 80f); } ((BasicMeleeAttack)this).FixedUpdate(); } public override void PlayAnimation() { ((EntityState)this).PlayCrossfade("Gesture, Override", "ShieldPunch", "Primary.playbackRate", base.duration * swingTimeCoefficient, 0.15f); } public override void OnExit() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).characterBody.HasBuff(SS2Content.Buffs.bdKnightCharged)) { ((EntityState)this).characterBody.SetBuffCount(SS2Content.Buffs.bdKnightCharged.buffIndex, 0); } ((BasicMeleeAttack)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } public override void AuthorityModifyOverlapAttack(OverlapAttack overlapAttack) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)this).AuthorityModifyOverlapAttack(overlapAttack); overlapAttack.damageType = (DamageType)32; if (((EntityState)this).characterBody.HasBuff(SS2Content.Buffs.bdKnightCharged)) { overlapAttack.damage *= 2f; } } } internal class SwingSpecial : BasicMeleeAttack { public static float swingTimeCoefficient = 1f; public static GameObject buffWard; public static float hopVelocity; private bool hasBuffed; private bool hasSpun; private GameObject wardInstance; [TokenModifier(/*Could not decode attribute arguments.*/)] public static float TokenModifier_dmgCoefficient => ((BasicMeleeAttack)new SwingSpecial()).damageCoefficient; public override void OnEnter() { ((BasicMeleeAttack)this).OnEnter(); hasBuffed = false; hasSpun = false; base.animator = ((EntityState)this).GetModelAnimator(); } public override void FixedUpdate() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)this).FixedUpdate(); if (base.animator.GetFloat("BuffActive") >= 0.5f && !hasBuffed) { hasBuffed = true; wardInstance = Object.Instantiate(buffWard); wardInstance.GetComponent().teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex; wardInstance.GetComponent().AttachToGameObjectAndSpawn(((EntityState)this).gameObject, (string)null); Util.PlaySound("CyborgUtility", ((EntityState)this).gameObject); } if (base.animator.GetFloat("SpecialSwing") >= 0.5f && !hasSpun) { hasSpun = true; if (!((BaseState)this).isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hopVelocity); } } } public override void PlayAnimation() { ((EntityState)this).PlayCrossfade("Body", "SwingSpecial", "Special.playbackRate", base.duration * swingTimeCoefficient, 0.15f); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } internal class SwingSword : BasicMeleeAttack, IStepSetter { public static float swingTimeCoefficient = 1.42f; [TokenModifier(/*Could not decode attribute arguments.*/)] public static GameObject beamProjectile; public int swingSide; private bool hasFiredBeam = true; public static float TokenModifier_dmgCoefficient => ((BasicMeleeAttack)new SwingSword()).damageCoefficient; public override void OnEnter() { ((BasicMeleeAttack)this).OnEnter(); base.animator = ((EntityState)this).GetModelAnimator(); } public override void PlayAnimation() { string text = ((swingSide == 0) ? "SwingSword1" : "SwingSword2"); ((EntityState)this).PlayCrossfade("Gesture, Override", text, "Primary.playbackRate", base.duration * swingTimeCoefficient, 0.05f); } void IStepSetter.SetStep(int i) { swingSide = i; base.swingEffectMuzzleString = ((swingSide == 0) ? "SwingLeft" : "SwingRight"); } public override void OnSerialize(NetworkWriter writer) { ((EntityState)this).OnSerialize(writer); writer.Write((byte)swingSide); } public override void OnDeserialize(NetworkReader reader) { ((EntityState)this).OnDeserialize(reader); swingSide = reader.ReadByte(); } public override void FixedUpdate() { //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_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) if (base.animator.GetFloat(base.mecanimHitboxActiveParameter) > 0.5f && ((EntityState)this).fixedAge >= base.duration * 0.1f && base.meleeAttackStartTime == FixedTimeStamp.positiveInfinity && ((EntityState)this).characterBody.HasBuff(SS2Content.Buffs.bdKnightBuff) && ((EntityState)this).isAuthority && !hasFiredBeam) { hasFiredBeam = true; ProjectileManager instance = ProjectileManager.instance; GameObject obj = beamProjectile; Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 origin = ((Ray)(ref aimRay)).origin; aimRay = ((BaseState)this).GetAimRay(); instance.FireProjectile(obj, origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * base.damageCoefficient, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, 80f); } ((BasicMeleeAttack)this).FixedUpdate(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace EntityStates.DropPod { public abstract class DropPodBaseState : EntityState { protected DropPodController PodController { get; private set; } public override void OnEnter() { ((EntityState)this).OnEnter(); PodController = ((EntityState)this).GetComponent(); if (!Object.op_Implicit((Object)(object)PodController) && ((EntityState)this).isAuthority) { base.outer.SetNextStateToMain(); } } } public class Idle : DropPodBaseState { public override void OnEnter() { ((EntityState)this).PlayAnimation("Base", "Idle"); base.OnEnter(); } public override void OnExit() { ((EntityState)this).OnExit(); } } public class PreRelease : DropPodBaseState { public override void OnEnter() { base.OnEnter(); ((EntityState)this).PlayAnimation("Base", "IdleToRelease"); Util.PlaySound("Play_UI_podBlastDoorOpen", ((EntityState)this).gameObject); Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { ((Component)((Component)modelTransform).GetComponent().FindChild("InitialExhaustFX")).gameObject.SetActive(true); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (!Object.op_Implicit((Object)(object)modelAnimator)) { return; } int layerIndex = modelAnimator.GetLayerIndex("Base"); if (layerIndex != -1) { AnimatorStateInfo currentAnimatorStateInfo = modelAnimator.GetCurrentAnimatorStateInfo(layerIndex); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("IdleToReleaseFinished")) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Release()); } } } } public class Release : DropPodBaseState { public static float ejectionSpeed = 20f; private bool spawnedRandom; private ChildLocator cLocator; public override void OnEnter() { base.OnEnter(); ((EntityState)this).PlayAnimation("Base", "Release"); Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { cLocator = ((Component)modelTransform).GetComponent(); ((Component)cLocator.FindChild("Door")).gameObject.SetActive(false); ((Component)cLocator.FindChild("ReleaseExhaustFX")).gameObject.SetActive(true); } if (Object.op_Implicit((Object)(object)base.PodController) && NetworkServer.active) { switch (base.PodController.GetRewardType()) { case DropPodController.RewardType.Item: Debug.Log((object)"Item"); base.PodController.SpawnItem(cLocator.FindChild("ExitPos")); spawnedRandom = true; break; case DropPodController.RewardType.Enemy: Debug.Log((object)"enemy"); base.PodController.SpawnEnemy(cLocator.FindChild("ExitPos")); spawnedRandom = true; break; case DropPodController.RewardType.Corpse: Debug.Log((object)"Corpse"); base.PodController.SpawnCorpse(cLocator.FindChild("ExitPos")); spawnedRandom = true; break; case DropPodController.RewardType.Nothing: Debug.Log((object)"Nothing"); spawnedRandom = true; break; } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (NetworkServer.active && spawnedRandom) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ReleaseFinished()); } } } public class ReleaseFinished : DropPodBaseState { public override void OnEnter() { base.OnEnter(); ((EntityState)this).PlayAnimation("Base", "Release"); } } } namespace EntityStates.DroneTable { public class DestroyAction : DroneTableBaseState { public static float duration; public PickupIndex tempIndex; public int droneIndex; public int itemIndex; public GameObject tempDrone; public static Material whiteHoloMaterial; public static Material greenHoloMaterial; public static Material redHoloMaterial; public CharacterModel tempModel; protected override bool enableInteraction => false; public override void OnEnter() { //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_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0110: 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_030c: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Expected I4, but got Unknown base.OnEnter(); tempDrone = null; Transform val = ((EntityState)this).gameObject.transform.Find("DroneHologramRoot"); ((Component)((EntityState)this).gameObject.transform.Find("ScrapRoot")).gameObject.SetActive(true); tempIndex = PickupCatalog.FindPickupIndex((ItemIndex)itemIndex); GameObject bodyPrefab = BodyCatalog.GetBodyPrefab((BodyIndex)Util.UintToIntMinusOne((uint)droneIndex)); ModelLocator component = bodyPrefab.GetComponent(); Util.PlaySound("RefabricatorAction", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)component)) { GameObject gameObject = ((Component)component.modelTransform).gameObject; if (Moonstorm.Starstorm2.Interactables.DroneTable.droneTripletPairs.TryGetValue(((Object)bodyPrefab).name, out var value)) { tempDrone = Object.Instantiate(gameObject, value.position, Quaternion.Euler(new Vector3(0f, 0f, 0f)), val); tempDrone.transform.localPosition = value.position; tempDrone.transform.localEulerAngles = value.rotation; tempDrone.transform.localScale = value.scale; } else { tempDrone = Object.Instantiate(gameObject, val.position, val.rotation, val); } if (((Object)bodyPrefab).name == "MegaDroneBody") { try { ((Component)tempDrone.transform.Find("MegaDroneArmature").Find("Base")).gameObject.SetActive(false); } catch (NullReferenceException ex) { Debug.Log((object)string.Concat("failed to turn off megadrone stuff (", ex, ")")); } } if (((Object)bodyPrefab).name == "ShockDroneBody") { try { ((Component)tempDrone.transform.Find("DroneBladeActive")).transform.localScale = new Vector3(4f, 4f, 4f); } catch (NullReferenceException ex2) { Debug.Log((object)string.Concat("failed to make shock drone propeller not look silly (", ex2, ")")); } } ChildLocator component2 = tempDrone.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { Transform val2 = component2.FindChild(component2.FindChildIndex("ChargeSparks")); if (Object.op_Implicit((Object)(object)val2)) { ((Component)val2).gameObject.SetActive(false); } } RotateObject[] componentsInChildren = tempDrone.GetComponentsInChildren(true); if (componentsInChildren.Length != 0) { RotateObject[] array = componentsInChildren; for (int i = 0; i < array.Length; i++) { ((Behaviour)array[i]).enabled = false; } } HurtBoxGroup component3 = tempDrone.GetComponent(); if (Object.op_Implicit((Object)(object)component3)) { HurtBox[] hurtBoxes = component3.hurtBoxes; foreach (HurtBox obj in hurtBoxes) { ((Behaviour)obj).enabled = false; ((Component)obj).gameObject.SetActive(false); } ((Behaviour)component3).enabled = false; } Animator component4 = tempDrone.GetComponent(); if (Object.op_Implicit((Object)(object)component4)) { ((Behaviour)component4).enabled = false; } tempModel = tempDrone.GetComponent(); if (Object.op_Implicit((Object)(object)tempModel)) { RendererInfo[] baseRendererInfos = tempModel.baseRendererInfos; ItemTier itemTier = ((PickupIndex)(ref tempIndex)).pickupDef.itemTier; switch ((int)itemTier) { case 0: { for (int k = 0; k < baseRendererInfos.Length; k++) { baseRendererInfos[k].defaultMaterial = whiteHoloMaterial; } break; } case 1: { for (int l = 0; l < baseRendererInfos.Length; l++) { baseRendererInfos[l].defaultMaterial = greenHoloMaterial; } break; } case 2: { for (int j = 0; j < baseRendererInfos.Length; j++) { baseRendererInfos[j].defaultMaterial = redHoloMaterial; } break; } } } } ((EntityState)this).PlayCrossfade("Main", "Action", "Action.playbackRate", duration, 0.05f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0026: 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) //IL_004a: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: 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_00c1: 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) ((EntityState)this).OnExit(); Transform val = ((EntityState)this).gameObject.transform.Find("Hungry"); if (Object.op_Implicit((Object)(object)val)) { val.localPosition += new Vector3(0f, 0.0048f, 0f); if (val.localPosition.y > 1.277f) { EntityState.Destroy((Object)(object)((Component)val).gameObject); } } if (Object.op_Implicit((Object)(object)tempDrone)) { EntityState.Destroy((Object)(object)tempDrone); } if (NetworkServer.active) { Transform val2 = ((EntityState)this).gameObject.transform.Find("PickupOrigin"); Vector3 val3 = Vector3.up * 10f + val2.forward * 4f; PickupDropletController.CreatePickupDroplet(tempIndex, val2.position, val3); } } public override void OnSerialize(NetworkWriter writer) { ((EntityState)this).OnSerialize(writer); writer.Write(droneIndex); writer.Write(itemIndex); } public override void OnDeserialize(NetworkReader reader) { ((EntityState)this).OnDeserialize(reader); droneIndex = reader.ReadInt32(); itemIndex = reader.ReadInt32(); } } public class DestroyLeadin : DroneTableBaseState { public static float duration; public int droneIndex; public int itemIndex; protected override bool enableInteraction => false; public override void OnEnter() { base.OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (NetworkServer.active && ((EntityState)this).fixedAge > duration) { DestroyAction destroyAction = new DestroyAction(); destroyAction.itemIndex = itemIndex; destroyAction.droneIndex = droneIndex; ((EntityState)this).outer.SetNextState((EntityState)(object)destroyAction); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void OnSerialize(NetworkWriter writer) { ((EntityState)this).OnSerialize(writer); writer.Write(droneIndex); writer.Write(itemIndex); } public override void OnDeserialize(NetworkReader reader) { ((EntityState)this).OnDeserialize(reader); droneIndex = reader.ReadInt32(); itemIndex = reader.ReadInt32(); } } public abstract class DroneTableBaseState : EntityState { protected Moonstorm.Starstorm2.Interactables.DroneTable.RefabricatorInteractionToken refabController; protected PurchaseInteraction purchaseInter; protected virtual bool enableInteraction => false; public override void OnEnter() { ((EntityState)this).OnEnter(); refabController = ((EntityState)this).GetComponent(); purchaseInter = ((EntityState)this).GetComponent(); if (NetworkServer.active) { purchaseInter.SetAvailable(enableInteraction); } } } public class Idle : DroneTableBaseState { protected override bool enableInteraction => true; public override void OnEnter() { base.OnEnter(); ((Component)((EntityState)this).gameObject.transform.Find("ScrapRoot")).gameObject.SetActive(false); } } } namespace EntityStates.Generic { public class NemesisSpawnState : BaseState { public static float duration = 3f; protected string portalMuzzle = "Chest"; private CameraRigController cameraController; private bool initCamera; public override void OnEnter() { ((BaseState)this).OnEnter(); initCamera = false; ((EntityState)this).PlayAnimation("FullBody, Override", "Spawn"); Util.PlaySound(SpawnState.spawnSoundString, ((EntityState)this).gameObject); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } SpawnEffect(); } public virtual void SpawnEffect() { if (Object.op_Implicit((Object)(object)SpawnState.spawnEffectPrefab)) { EffectManager.SimpleMuzzleFlash(SpawnState.spawnEffectPrefab, ((EntityState)this).gameObject, portalMuzzle, false); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!Object.op_Implicit((Object)(object)cameraController)) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master.playerCharacterMasterController) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master.playerCharacterMasterController.networkUser)) { cameraController = ((EntityState)this).characterBody.master.playerCharacterMasterController.networkUser.cameraRigController; } } else if (!initCamera) { initCamera = true; } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)6; } } } namespace EntityStates.Executioner2 { public class AimIonGunOld : BaseSkillState { public static float baseDuration = 0.1f; private float chargeTimer; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((EntityState)this).characterBody.attackSpeed; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (duration >= ((EntityState)this).fixedAge && ((EntityState)this).isAuthority) { ((EntityState)this).PlayAnimation("Gesture, Override", "FireIonGunStart", "Secondary.playbackRate", duration); FireIonGunOld fireIonGunOld = new FireIonGunOld(); ((BaseSkillState)fireIonGunOld).activatorSkillSlot = ((BaseSkillState)this).activatorSkillSlot; ((EntityState)this).outer.SetNextState((EntityState)(object)fireIonGunOld); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)0; } } public class ChargeGun : BaseSkillState { public static float baseDuration = 1.2f; [HideInInspector] public static GameObject chargeEffectPrefab = null; public static GameObject defaultChargeEffectPrefab; public static GameObject masteryChargeEffectPrefab; private GameObject chargeEffectInstance; public static float timeBetweenStocks = 1.2f; [HideInInspector] public static GameObject plumeEffect = SS2Assets.LoadAsset("exePlume", SS2Bundle.Executioner2); [HideInInspector] public static GameObject plumeEffectLarge = SS2Assets.LoadAsset("exePlumeBig", SS2Bundle.Executioner2); public static GameObject defaultPlume; public static GameObject defaultPlumeLarge; [SerializeField] public SkillDef primaryOverride; private SkillDef overrideDef; private GenericSkill overriddenSkill; private bool thisFuckingSucks; private float chargeTimer; private float duration; private bool isPressingCameraSwap; private bool useAltCamera; private NetworkStateMachine nsm; private EntityStateMachine weaponEsm; private string skinNameToken; private float timer; public CameraParamsOverrideHandle camOverrideHandle; private CharacterCameraParamsData chargeCameraParams = new CharacterCameraParamsData { maxPitch = BlendableFloat.op_Implicit(85f), minPitch = BlendableFloat.op_Implicit(-85f), pivotVerticalOffset = BlendableFloat.op_Implicit(1f), idealLocalCameraPos = BlendableVector3.op_Implicit(chargeCameraPos), wallCushion = BlendableFloat.op_Implicit(0.1f) }; private CharacterCameraParamsData altCameraParams = new CharacterCameraParamsData { maxPitch = BlendableFloat.op_Implicit(85f), minPitch = BlendableFloat.op_Implicit(-85f), pivotVerticalOffset = BlendableFloat.op_Implicit(1f), idealLocalCameraPos = BlendableVector3.op_Implicit(altCameraPos), wallCushion = BlendableFloat.op_Implicit(0.1f) }; [HideInInspector] public static Vector3 chargeCameraPos = new Vector3(1.2f, -0.65f, -6.1f); [HideInInspector] public static Vector3 altCameraPos = new Vector3(-1.2f, -0.65f, -6.1f); public override void OnEnter() { ((BaseState)this).OnEnter(); skinNameToken = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; if (skinNameToken == "SS2_SKIN_EXECUTIONER_MASTERY") { chargeEffectPrefab = masteryChargeEffectPrefab; } else { chargeEffectPrefab = defaultChargeEffectPrefab; } nsm = ((EntityState)this).GetComponent(); if ((Object)(object)nsm != (Object)null) { weaponEsm = nsm.stateMachines[1]; } if (((EntityState)this).inputBank.skill4.down) { ((EntityState)this).outer.SetNextStateToMain(); return; } duration = baseDuration * ((EntityState)this).skillLocator.secondary.cooldownScale; ((EntityState)this).PlayCrossfade("Gesture, Override", "FireIonGunStart", "Secondary.playbackRate", duration, 0.3f); ((EntityState)this).characterBody.SetAimTimer(2f); CameraSwap(); GenericSkill primary = ((EntityState)this).skillLocator.primary; if (Object.op_Implicit((Object)(object)primary) && !Object.op_Implicit((Object)(object)overriddenSkill)) { overriddenSkill = primary; overriddenSkill.SetSkillOverride((object)primary, primaryOverride, (SkillOverridePriority)3); } } private void CameraSwap() { //IL_0061: 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0093: 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_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_000f: 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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0040: 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_0049: 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_0054: Unknown result type (might be due to invalid IL or missing references) if (useAltCamera) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 0.2f); CameraParamsOverrideRequest val = default(CameraParamsOverrideRequest); val.cameraParamsData = altCameraParams; val.priority = 0f; CameraParamsOverrideRequest val2 = val; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val2, 0.2f); } else { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 0.2f); CameraParamsOverrideRequest val = default(CameraParamsOverrideRequest); val.cameraParamsData = chargeCameraParams; val.priority = 0f; CameraParamsOverrideRequest val3 = val; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val3, 0.2f); } } public override void Update() { ((EntityState)this).Update(); if (Input.GetKeyDown((KeyCode)118) && ((EntityState)this).isAuthority) { useAltCamera = !useAltCamera; CameraSwap(); } } public override void FixedUpdate() { //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.isSprinting = false; if (!thisFuckingSucks && ((EntityState)this).skillLocator.secondary.stock == 0) { thisFuckingSucks = true; ((EntityState)this).PlayCrossfade("Gesture, Override", "FireIonGunStart", "Secondary.playbackRate", duration, 0.3f); } if (thisFuckingSucks && ((EntityState)this).skillLocator.secondary.stock >= 1) { thisFuckingSucks = false; } if (((EntityState)this).isAuthority && (!((EntityState)this).inputBank.skill2.down || ((EntityState)this).inputBank.skill3.down || ((EntityState)this).inputBank.skill4.down)) { ((EntityState)this).outer.SetNextStateToMain(); return; } if (weaponEsm.IsInMainState()) { timer += Time.fixedDeltaTime; } else { timer = 0f; } if (timer >= timeBetweenStocks * ((EntityState)this).skillLocator.secondary.cooldownScale / ((BaseState)this).attackSpeedStat && ((EntityState)this).characterBody.skillLocator.secondary.stock < ((EntityState)this).characterBody.skillLocator.secondary.maxStock) { timer = 0f; GenericSkill secondary = ((EntityState)this).skillLocator.secondary; secondary.stock += 1; if (((EntityState)this).characterBody.skillLocator.secondary.stock < ((EntityState)this).characterBody.skillLocator.secondary.maxStock) { Util.PlaySound("ExecutionerGainCharge", ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(plumeEffect, ((EntityState)this).gameObject, "ExhaustL", true); EffectManager.SimpleMuzzleFlash(plumeEffect, ((EntityState)this).gameObject, "ExhaustR", true); } if (((EntityState)this).characterBody.skillLocator.secondary.stock >= ((EntityState)this).characterBody.skillLocator.secondary.maxStock) { Util.PlaySound("ExecutionerMaxCharge", ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(plumeEffectLarge, ((EntityState)this).gameObject, "ExhaustL", true); EffectManager.SimpleMuzzleFlash(plumeEffectLarge, ((EntityState)this).gameObject, "ExhaustR", true); EffectManager.SimpleEffect(Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/LightningFlash.prefab").WaitForCompletion(), ((EntityState)this).characterBody.corePosition, Quaternion.identity, false); } ((EntityState)this).characterBody.SetAimTimer(timeBetweenStocks); } if (Object.op_Implicit((Object)(object)chargeEffectPrefab) && !Object.op_Implicit((Object)(object)chargeEffectInstance) && ((EntityState)this).fixedAge >= 0.3f) { Transform val = ((Component)((EntityState)this).modelLocator.modelTransform).GetComponent().FindChild("ExhaustGun"); if (skinNameToken == "SS2_SKIN_EXECUTIONER_MASTERY") { chargeEffectInstance = Object.Instantiate(masteryChargeEffectPrefab, val.position, val.rotation); } else { chargeEffectInstance = Object.Instantiate(defaultChargeEffectPrefab, val.position, val.rotation); } chargeEffectInstance.transform.parent = ((Component)val).transform; } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } public override void OnExit() { //IL_003a: 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) ((EntityState)this).OnExit(); ((EntityState)this).PlayCrossfade("Gesture, Override", "BufferEmpty", "Secondary.playbackRate", duration, 0.3f); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 0.7f); } if (Object.op_Implicit((Object)(object)overriddenSkill)) { overriddenSkill.UnsetSkillOverride((object)((EntityState)this).skillLocator.primary, primaryOverride, (SkillOverridePriority)3); } if (Object.op_Implicit((Object)(object)chargeEffectInstance)) { EntityState.Destroy((Object)(object)chargeEffectInstance); } ((EntityState)this).skillLocator.primary.RemoveAllStocks(); } } public class Dash : BaseSkillState { public static float baseDuration = 0.6f; public static float speedMultiplier = 3f; public static float debuffRadius = 14f; [TokenModifier(/*Could not decode attribute arguments.*/)] public static float debuffDuration = 4f; public static float debuffCheckInterval = 0.0333333f; public static float hopVelocity; private float debuffCheckStopwatch; private float duration; private SphereSearch fearSearch; private List hits; private Animator animator; public static GameObject dashEffect; public static GameObject dashEffectMastery; public static Material dashMasteryMaterial; public static string ExhaustL; public static string ExhaustR; private string skinNameToken; public override void OnEnter() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_0096: 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_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); debuffCheckStopwatch = 0f; duration = baseDuration; Util.PlayAttackSpeedSound("ExecutionerUtility", ((EntityState)this).gameObject, 1f); ((EntityState)this).PlayAnimation("FullBody, Override", "Utility", "Utility.playbackRate", duration * 1.65f); HopIfAirborne(); ((EntityState)this).characterDirection.turnSpeed = 360f; hits = new List(); fearSearch = new SphereSearch(); fearSearch.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; fearSearch.radius = debuffRadius; if (NetworkServer.active) { CreateFearAoe(); } skinNameToken = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; if (skinNameToken == "SS2_SKIN_EXECUTIONER2_MASTERY") { EffectManager.SimpleMuzzleFlash(dashEffectMastery, ((EntityState)this).gameObject, ExhaustL, true); EffectManager.SimpleMuzzleFlash(dashEffectMastery, ((EntityState)this).gameObject, ExhaustR, true); } else { EffectManager.SimpleMuzzleFlash(dashEffect, ((EntityState)this).gameObject, ExhaustL, true); EffectManager.SimpleMuzzleFlash(dashEffect, ((EntityState)this).gameObject, ExhaustR, true); } Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlay val = ((Component)modelTransform).gameObject.AddComponent(); if (skinNameToken == "SS2_SKIN_EXECUTIONER2_MASTERY") { val.duration = 1.3f * baseDuration; } else { val.duration = 1.5f * baseDuration; } val.animateShaderAlpha = true; val.alphaCurve = AnimationCurve.EaseInOut(0f, 0.5f, 1f, 0f); val.destroyComponentOnEnd = true; if (skinNameToken == "SS2_SKIN_EXECUTIONER2_MASTERY") { val.originalMaterial = dashMasteryMaterial; } else { val.originalMaterial = Addressables.LoadAssetAsync((object)"RoR2/Base/Huntress/matHuntressFlashBright.mat").WaitForCompletion(); } val.AddToCharacerModel(((Component)modelTransform).GetComponent()); } } private void CreateFearAoe() { //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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) hits.Clear(); fearSearch.ClearCandidates(); fearSearch.origin = ((EntityState)this).characterBody.corePosition; fearSearch.RefreshCandidates(); fearSearch.FilterCandidatesByDistinctHurtBoxEntities(); fearSearch.FilterCandidatesByHurtBoxTeam(TeamMask.GetUnprotectedTeams(((EntityState)this).teamComponent.teamIndex)); fearSearch.GetHurtBoxes(hits); foreach (HurtBox hit in hits) { HealthComponent healthComponent = hit.healthComponent; if (!Object.op_Implicit((Object)(object)healthComponent)) { continue; } SetStateOnHurt component = ((Component)healthComponent).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Type type = ((object)component.targetStateMachine.state).GetType(); if (type != typeof(StunState) && type != typeof(ShockState) && type != typeof(FrozenState)) { component.SetStun(-1f); } } CharacterBody body = healthComponent.body; if (Object.op_Implicit((Object)(object)body) && (Object)(object)body != (Object)(object)((EntityState)this).characterBody) { body.AddTimedBuff(SS2Content.Buffs.BuffFear, debuffDuration); if (Object.op_Implicit((Object)(object)body.master) && Object.op_Implicit((Object)(object)body.master.aiComponents[0])) { body.master.aiComponents[0].stateMachine.SetNextState((EntityState)(object)new EntityStates.AI.Walker.Fear { fearTarget = ((EntityState)this).gameObject }); } } } } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).characterDirection.turnSpeed = 720f; } public override void FixedUpdate() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004e: 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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.isSprinting = true; if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += ((EntityState)this).characterDirection.forward * ((EntityState)this).characterBody.moveSpeed * speedMultiplier * Time.fixedDeltaTime; } if (NetworkServer.active) { debuffCheckStopwatch += Time.fixedDeltaTime; if (debuffCheckStopwatch >= debuffCheckInterval) { debuffCheckInterval -= debuffCheckInterval; CreateFearAoe(); } } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void HopIfAirborne() { if (!((EntityState)this).characterMotor.isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hopVelocity); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class ExecuteHold : BaseSkillState { public static float duration = 1f; public static GameObject jumpEffect; public static GameObject jumpEffectMastery; public static string ExhaustL; public static string ExhaustR; private string skinNameToken; public static GameObject areaIndicator; public static GameObject areaIndicatorOOB; [HideInInspector] public GameObject areaIndicatorInstance; [HideInInspector] public GameObject areaIndicatorInstanceOOB; private ExecutionerController exeController; private bool controlledExit; public bool imAFilthyFuckingLiar; private CameraParamsOverrideHandle camOverrideHandle; private CharacterCameraParamsData slamCameraParams = new CharacterCameraParamsData { maxPitch = BlendableFloat.op_Implicit(88f), minPitch = BlendableFloat.op_Implicit(25f), pivotVerticalOffset = BlendableFloat.op_Implicit(1f), idealLocalCameraPos = BlendableVector3.op_Implicit(slamCameraPosition), wallCushion = BlendableFloat.op_Implicit(0.1f) }; [HideInInspector] public static Vector3 slamCameraPosition = new Vector3(2.6f, -2f, -8f); public override void OnEnter() { //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0125: 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) ((BaseState)this).OnEnter(); exeController = ((EntityState)this).GetComponent(); if ((Object)(object)exeController != (Object)null) { exeController.meshExeAxe.SetActive(true); } ((EntityState)this).characterBody.hideCrosshair = true; ((EntityState)this).PlayAnimation("FullBody, Override", "SpecialHang", "Special.playbackRate", duration); if (((EntityState)this).isAuthority) { skinNameToken = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; if (skinNameToken == "SS2_SKIN_EXECUTIONER2_MASTERY") { EffectManager.SimpleMuzzleFlash(jumpEffectMastery, ((EntityState)this).gameObject, ExhaustL, true); EffectManager.SimpleMuzzleFlash(jumpEffectMastery, ((EntityState)this).gameObject, ExhaustR, true); } else { EffectManager.SimpleMuzzleFlash(jumpEffect, ((EntityState)this).gameObject, ExhaustL, true); EffectManager.SimpleMuzzleFlash(jumpEffect, ((EntityState)this).gameObject, ExhaustR, true); } CameraParamsOverrideRequest val = default(CameraParamsOverrideRequest); val.cameraParamsData = slamCameraParams; val.priority = 0f; CameraParamsOverrideRequest val2 = val; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val2, 0f); ((EntityState)this).characterBody.SetAimTimer(duration); areaIndicatorInstance = Object.Instantiate(areaIndicator); areaIndicatorInstance.SetActive(true); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { FixedUpdateAuthority(); } } public override void Update() { ((EntityState)this).Update(); UpdateAreaIndicator(); } private void UpdateAreaIndicator() { //IL_0017: 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_001d: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_0046: 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) if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { float num = 256f; Ray aimRay = ((BaseState)this).GetAimRay(); RaycastHit val = default(RaycastHit); if (Physics.Raycast(aimRay, ref val, num, LayerMask.op_Implicit(CommonMasks.bullet))) { imAFilthyFuckingLiar = true; areaIndicatorInstance.transform.position = ((RaycastHit)(ref val)).point; areaIndicatorInstance.transform.up = ((RaycastHit)(ref val)).normal; } else { imAFilthyFuckingLiar = false; areaIndicatorInstance.transform.position = ((Ray)(ref aimRay)).GetPoint(num); areaIndicatorInstance.transform.up = -((Ray)(ref aimRay)).direction; } } } private void FixedUpdateAuthority() { if (((EntityState)this).fixedAge >= duration || !((EntityState)this).inputBank.skill4.down || ((EntityState)this).inputBank.skill1.down) { ExecuteSlam executeSlam = new ExecuteSlam(); executeSlam.wasLiedTo = imAFilthyFuckingLiar; ((EntityState)this).outer.SetNextState((EntityState)(object)executeSlam); } else { HandleMovement(); } } public void HandleMovement() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).characterMotor.velocity = Vector3.zero; } public override void OnExit() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); ((EntityState)this).characterBody.hideCrosshair = false; if ((Object)(object)exeController != (Object)null && !controlledExit) { exeController.meshExeAxe.SetActive(false); } if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 1f); } if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { EntityState.Destroy((Object)(object)areaIndicatorInstance.gameObject); } if (Object.op_Implicit((Object)(object)areaIndicatorInstanceOOB)) { EntityState.Destroy((Object)(object)areaIndicatorInstanceOOB.gameObject); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class ExecuteLeap : BaseSkillState { private Vector3 flyVector = Vector3.zero; public static AnimationCurve speedCoefficientCurve; public static float duration = 0.8f; public static float crosshairDur = 0.75f; public static GameObject jumpEffect; public static GameObject jumpEffectMastery; public static Material jumpMaterialMastery; public static string ExhaustL; public static string ExhaustR; private string skinNameToken; private bool hasPlacedCrosshair; private bool controlledExit; public static GameObject areaIndicator; public static GameObject areaIndicatorOOB; [HideInInspector] public GameObject areaIndicatorInstance; [HideInInspector] public GameObject areaIndicatorInstanceOOB; private ExecutionerController exeController; private CameraParamsOverrideHandle camOverrideHandle; private CharacterCameraParamsData slamCameraParams = new CharacterCameraParamsData { maxPitch = BlendableFloat.op_Implicit(88f), minPitch = BlendableFloat.op_Implicit(25f), pivotVerticalOffset = BlendableFloat.op_Implicit(1f), idealLocalCameraPos = BlendableVector3.op_Implicit(slamCameraPosition), wallCushion = BlendableFloat.op_Implicit(0.1f) }; public static Vector3 slamCameraPosition = new Vector3(2.6f, -2f, -8f); public override void OnEnter() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); skinNameToken = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; exeController = ((EntityState)this).GetComponent(); if ((Object)(object)exeController != (Object)null) { exeController.meshExeAxe.SetActive(true); exeController.hasOOB = false; } ((EntityState)this).characterBody.hideCrosshair = true; ((EntityState)this).characterBody.SetAimTimer(duration); flyVector = Vector3.up; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlay val = ((Component)modelTransform).gameObject.AddComponent(); val.animateShaderAlpha = true; val.destroyComponentOnEnd = true; if (skinNameToken == "SS2_SKIN_EXECUTIONER2_MASTERY") { val.duration = 0.3f * duration; val.originalMaterial = jumpMaterialMastery; val.alphaCurve = AnimationCurve.EaseInOut(0f, 0.5f, 0.5f, 100f); } else { val.duration = 1.5f * duration; val.originalMaterial = Addressables.LoadAssetAsync((object)"RoR2/Base/Huntress/matHuntressFlashBright.mat").WaitForCompletion(); val.alphaCurve = AnimationCurve.EaseInOut(0f, 0.5f, 0.5f, 0f); } val.AddToCharacerModel(((Component)modelTransform).GetComponent()); } Util.PlaySound("ExecutionerSpecialCast", ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("FullBody, Override", "SpecialJump", "Special.playbackRate", duration); if (((EntityState)this).isAuthority) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(); if (skinNameToken == "SS2_SKIN_EXECUTIONER2_MASTERY") { EffectManager.SimpleMuzzleFlash(jumpEffectMastery, ((EntityState)this).gameObject, ExhaustL, true); EffectManager.SimpleMuzzleFlash(jumpEffectMastery, ((EntityState)this).gameObject, ExhaustR, true); } else { EffectManager.SimpleMuzzleFlash(jumpEffect, ((EntityState)this).gameObject, ExhaustL, true); EffectManager.SimpleMuzzleFlash(jumpEffect, ((EntityState)this).gameObject, ExhaustR, true); } CameraParamsOverrideRequest val2 = default(CameraParamsOverrideRequest); val2.cameraParamsData = slamCameraParams; val2.priority = 1f; CameraParamsOverrideRequest val3 = val2; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val3, 0.5f); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration * crosshairDur && !hasPlacedCrosshair) { hasPlacedCrosshair = true; areaIndicatorInstance = Object.Instantiate(areaIndicator); areaIndicatorInstance.SetActive(true); } if (((EntityState)this).isAuthority) { FixedUpdateAuthority(); } } public override void Update() { ((EntityState)this).Update(); UpdateAreaIndicator(); } private void UpdateAreaIndicator() { //IL_0017: 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_001d: 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_006f: 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_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { float num = 256f; Ray aimRay = ((BaseState)this).GetAimRay(); RaycastHit val = default(RaycastHit); if (Physics.Raycast(aimRay, ref val, num, LayerMask.op_Implicit(CommonMasks.bullet))) { areaIndicatorInstance.transform.position = ((RaycastHit)(ref val)).point; areaIndicatorInstance.transform.up = ((RaycastHit)(ref val)).normal; } else { areaIndicatorInstance.transform.position = ((Ray)(ref aimRay)).GetPoint(num); areaIndicatorInstance.transform.up = -((Ray)(ref aimRay)).direction; } } } private void FixedUpdateAuthority() { if (((EntityState)this).fixedAge >= duration) { controlledExit = true; if (((EntityState)this).inputBank.skill4.down) { ExecuteHold nextState = new ExecuteHold(); ((EntityState)this).outer.SetNextState((EntityState)(object)nextState); } else { ExecuteSlam nextState2 = new ExecuteSlam(); ((EntityState)this).outer.SetNextState((EntityState)(object)nextState2); } } else { HandleMovement(); } } public void HandleMovement() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_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_0045: Unknown result type (might be due to invalid IL or missing references) CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += flyVector * (((BaseState)this).moveSpeedStat * speedCoefficientCurve.Evaluate(((EntityState)this).fixedAge / duration) * Time.fixedDeltaTime * 2f); ((EntityState)this).characterMotor.velocity.y = 0f; } public override void OnExit() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); ((EntityState)this).characterBody.hideCrosshair = false; if ((Object)(object)exeController != (Object)null && !controlledExit) { exeController.meshExeAxe.SetActive(false); } if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 0.1f); } if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { EntityState.Destroy((Object)(object)areaIndicatorInstance.gameObject); } if (Object.op_Implicit((Object)(object)areaIndicatorInstanceOOB)) { EntityState.Destroy((Object)(object)areaIndicatorInstanceOOB.gameObject); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class ExecuteSlam : BaseSkillState { public static float baseDamageCoefficient; public static float slamRadius; public static float procCoefficient; public static float recoil; public static GameObject slamEffect; public static GameObject slamEffectMastery; private string skinNameToken; public static float duration = 1f; private bool hasSlammed; private Vector3 dashVector = Vector3.zero; private ExecutionerController exeController; public bool wasLiedTo; private CameraParamsOverrideHandle camOverrideHandle; private CharacterCameraParamsData slamCameraParams = new CharacterCameraParamsData { maxPitch = BlendableFloat.op_Implicit(88f), minPitch = BlendableFloat.op_Implicit(-70f), pivotVerticalOffset = BlendableFloat.op_Implicit(1f), idealLocalCameraPos = BlendableVector3.op_Implicit(slamCameraPosition), wallCushion = BlendableFloat.op_Implicit(0.1f) }; public static Vector3 slamCameraPosition = new Vector3(0f, 0f, -32.5f); public override void OnEnter() { //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00e0: 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_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); skinNameToken = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; exeController = ((EntityState)this).GetComponent(); if ((Object)(object)exeController != (Object)null) { exeController.meshExeAxe.SetActive(true); exeController.isExec = true; } ((EntityState)this).characterBody.hideCrosshair = true; ((EntityState)this).PlayAnimation("FullBody, Override", "SpecialSwing", "Special.playbackRate", duration * 0.8f); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); ((EntityState)this).characterMotor.onHitGroundAuthority += new HitGroundDelegate(GroundSlam); ((EntityState)this).characterBody.isSprinting = true; ((EntityState)this).characterBody.SetAimTimer(duration); if (((EntityState)this).isAuthority) { CameraParamsOverrideRequest val = default(CameraParamsOverrideRequest); val.cameraParamsData = slamCameraParams; val.priority = 1f; CameraParamsOverrideRequest val2 = val; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val2, 0.1f); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { FixedUpdateAuthority(); } } private void FixedUpdateAuthority() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).characterDirection.forward = dashVector; if (!hasSlammed) { hasSlammed = true; dashVector = ((EntityState)this).inputBank.aimDirection; } else if (Object.op_Implicit((Object)(object)exeController)) { if (!exeController.hasOOB) { HandleMovement(); } else { ((EntityState)this).outer.SetNextStateToMain(); } } } public void HandleMovement() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += dashVector * ((BaseState)this).moveSpeedStat * 18.5f * Time.fixedDeltaTime; } private void GroundSlamPos(Vector3 position) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0024: 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_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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) //IL_00d9: 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_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011d: 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_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: 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_01ac: Unknown result type (might be due to invalid IL or missing references) SphereSearch val = new SphereSearch(); List list = new List(); List list2 = new List(); float num = baseDamageCoefficient; float num2 = 1f; val.ClearCandidates(); val.origin = position; val.radius = slamRadius; val.RefreshCandidates(); val.FilterCandidatesByDistinctHurtBoxEntities(); val.FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(((EntityState)this).teamComponent.teamIndex)); val.GetHurtBoxes(list); list2.Clear(); foreach (HurtBox item in list) { HealthComponent healthComponent = item.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent) && !list2.Contains(healthComponent)) { list2.Add(healthComponent); } } if (list2.Count <= 1) { num *= 2f; num2 += 1f; } bool crit = ((BaseState)this).RollCrit(); new BlastAttack { radius = slamRadius, procCoefficient = procCoefficient * num2, position = position, attacker = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).teamComponent.teamIndex, crit = crit, baseDamage = ((EntityState)this).characterBody.damage * num, damageColorIndex = (DamageColorIndex)0, falloffModel = (FalloffModel)0, attackerFiltering = (AttackerFiltering)2, damageType = (DamageType)262144 }.Fire(); ((BaseState)this).AddRecoil(-0.4f * recoil, -0.8f * recoil, -0.3f * recoil, 0.3f * recoil); if (Object.op_Implicit((Object)(object)slamEffect)) { if (skinNameToken == "SS2_SKIN_EXECUTIONER2_MASTERY") { EffectManager.SimpleEffect(slamEffectMastery, position, Quaternion.identity, true); } else { EffectManager.SimpleEffect(slamEffect, position, Quaternion.identity, true); } } ((EntityState)this).outer.SetNextStateToMain(); } private void GroundSlam(ref HitGroundInfo hitGroundInfo) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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_0042: 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_0050: 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) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013c: 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_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) SphereSearch val = new SphereSearch(); List list = new List(); List list2 = new List(); float num = baseDamageCoefficient; float num2 = 1f; val.ClearCandidates(); val.origin = hitGroundInfo.position; val.radius = slamRadius; val.RefreshCandidates(); val.FilterCandidatesByDistinctHurtBoxEntities(); val.FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(((EntityState)this).teamComponent.teamIndex)); val.GetHurtBoxes(list); list2.Clear(); foreach (HurtBox item in list) { HealthComponent healthComponent = item.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent) && !list2.Contains(healthComponent)) { list2.Add(healthComponent); } } if (list2.Count <= 1) { num *= 2f; num2 += 1f; } bool crit = ((BaseState)this).RollCrit(); new BlastAttack { radius = slamRadius, procCoefficient = procCoefficient * num2, position = hitGroundInfo.position, attacker = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).teamComponent.teamIndex, crit = crit, baseDamage = ((EntityState)this).characterBody.damage * num, damageColorIndex = (DamageColorIndex)0, falloffModel = (FalloffModel)0, attackerFiltering = (AttackerFiltering)2, damageType = (DamageType)262144 }.Fire(); ((BaseState)this).AddRecoil(-0.4f * recoil, -0.8f * recoil, -0.3f * recoil, 0.3f * recoil); if (Object.op_Implicit((Object)(object)slamEffect)) { if (skinNameToken == "SS2_SKIN_EXECUTIONER2_MASTERY") { EffectManager.SimpleEffect(slamEffectMastery, hitGroundInfo.position, Quaternion.identity, true); } else { EffectManager.SimpleEffect(slamEffect, hitGroundInfo.position, Quaternion.identity, true); } } ((EntityState)this).outer.SetNextStateToMain(); } public override void OnExit() { //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_0081: 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_0088: 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_00ab: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); ((EntityState)this).characterBody.hideCrosshair = false; if ((Object)(object)exeController != (Object)null) { exeController.meshExeAxe.SetActive(false); exeController.isExec = false; exeController.hasOOB = false; } ((EntityState)this).PlayAnimation("FullBody, Override", "SpecialImpact", "Special.playbackRate", duration); ((EntityState)this).characterMotor.onHitGroundAuthority -= new HitGroundDelegate(GroundSlam); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags - 1); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 1.2f); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class FireChargeGun : BaseSkillState { [TokenModifier(/*Could not decode attribute arguments.*/)] public static float damageCoefficient = 3.8f; public static float damageBurstCoefficient = 0.5f; public static float procCoefficient = 1f; public static float baseDuration = 0.085f; public static float recoil = 0.6f; [SerializeField] public static bool useAimAssist = false; public static float aimSnapAngle = 5.5f; public static float range = 200f; public static float force = 200f; public static float spreadBloomValue = 0.8f; public static string muzzleString = "Muzzle"; public static GameObject ionEffectPrefab; public static GameObject muzzlePrefabMastery; public static GameObject tracerPrefabMastery; public static GameObject hitPrefabMastery; private string skinNameToken; public bool fullBurst; public bool firstShot = true; [HideInInspector] public static GameObject muzzlePrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/MuzzleflashFMJ.prefab").WaitForCompletion(); public static GameObject tracerPrefab; [HideInInspector] public static GameObject tracerExtraPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/TracerCommandoShotgun.prefab").WaitForCompletion(); [HideInInspector] public static GameObject hitPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/HitsparkCommandoShotgun.prefab").WaitForCompletion(); public int shotsToFire; public int shotsFired; private float duration; private List targets; private ShackledLamp.LampBehavior lamp; public override void OnEnter() { //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); if (firstShot) { shotsToFire = ((EntityState)this).skillLocator.secondary.stock; } if (((EntityState)this).skillLocator.secondary.stock != 0 && shotsToFire != shotsFired) { duration = baseDuration / ((BaseState)this).attackSpeedStat; if (!fullBurst) { _ = ((EntityState)this).skillLocator.secondary.stock; _ = 10; } skinNameToken = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; lamp = ((Component)((Component)((EntityState)this).GetModelTransform()).GetComponent().body).GetComponent(); if (skinNameToken == "SS2_SKIN_EXECUTIONER2_MASTERY") { muzzlePrefab = muzzlePrefabMastery; ((EntityState)this).PlayAnimation("Gesture, Override", "FireIonGun", "Secondary.playbackRate", duration); EffectManager.SimpleMuzzleFlash(muzzlePrefab, ((EntityState)this).gameObject, muzzleString, false); } else { muzzlePrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/MuzzleflashFMJ.prefab").WaitForCompletion(); ((EntityState)this).PlayAnimation("Gesture, Override", "FireIonGun", "Secondary.playbackRate", duration); EffectManager.SimpleMuzzleFlash(muzzlePrefab, ((EntityState)this).gameObject, muzzleString, false); } Shoot(); ((EntityState)this).skillLocator.secondary.DeductStock(1); shotsFired++; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!(((EntityState)this).fixedAge >= duration) || !((EntityState)this).isAuthority) { return; } if (((EntityState)this).skillLocator.secondary.stock > 0 && shotsToFire > shotsFired) { FireChargeGun fireChargeGun = new FireChargeGun(); fireChargeGun.shotsFired = shotsFired; ((BaseSkillState)fireChargeGun).activatorSkillSlot = ((BaseSkillState)this).activatorSkillSlot; if (fullBurst) { fireChargeGun.fullBurst = true; } fireChargeGun.firstShot = false; fireChargeGun.shotsToFire = shotsToFire; ((EntityState)this).outer.SetNextState((EntityState)(object)fireChargeGun); } else { ((EntityState)this).outer.SetNextStateToMain(); } } private void Shoot() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: 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_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0215: 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_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Expected O, but got Unknown //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: 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_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0119: 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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_0400: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_0423: Unknown result type (might be due to invalid IL or missing references) //IL_042e: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_0441: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Unknown result type (might be due to invalid IL or missing references) //IL_0453: Unknown result type (might be due to invalid IL or missing references) //IL_045e: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_048b: Unknown result type (might be due to invalid IL or missing references) //IL_0491: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04b2: Expected O, but got Unknown //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Expected O, but got Unknown //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_04d9: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Unknown result type (might be due to invalid IL or missing references) //IL_04df: Unknown result type (might be due to invalid IL or missing references) //IL_04e5: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_04ed: Unknown result type (might be due to invalid IL or missing references) //IL_04f2: Unknown result type (might be due to invalid IL or missing references) //IL_050a: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_0515: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_051c: Unknown result type (might be due to invalid IL or missing references) //IL_0527: Unknown result type (might be due to invalid IL or missing references) //IL_0532: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0539: Unknown result type (might be due to invalid IL or missing references) //IL_0544: Unknown result type (might be due to invalid IL or missing references) //IL_054b: Unknown result type (might be due to invalid IL or missing references) //IL_0556: Unknown result type (might be due to invalid IL or missing references) //IL_055d: Unknown result type (might be due to invalid IL or missing references) //IL_0569: Unknown result type (might be due to invalid IL or missing references) //IL_0574: Unknown result type (might be due to invalid IL or missing references) //IL_057b: Unknown result type (might be due to invalid IL or missing references) //IL_058c: Unknown result type (might be due to invalid IL or missing references) //IL_0597: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05ae: Unknown result type (might be due to invalid IL or missing references) //IL_05b9: Unknown result type (might be due to invalid IL or missing references) //IL_05bf: Unknown result type (might be due to invalid IL or missing references) //IL_05c4: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05d4: Unknown result type (might be due to invalid IL or missing references) //IL_05e1: Expected O, but got Unknown //IL_0703: Unknown result type (might be due to invalid IL or missing references) //IL_0708: Unknown result type (might be due to invalid IL or missing references) //IL_0709: Unknown result type (might be due to invalid IL or missing references) //IL_070f: Unknown result type (might be due to invalid IL or missing references) //IL_0712: Unknown result type (might be due to invalid IL or missing references) //IL_0717: Unknown result type (might be due to invalid IL or missing references) //IL_071c: Unknown result type (might be due to invalid IL or missing references) //IL_0734: Unknown result type (might be due to invalid IL or missing references) //IL_073a: Unknown result type (might be due to invalid IL or missing references) //IL_073f: Unknown result type (might be due to invalid IL or missing references) //IL_0741: Unknown result type (might be due to invalid IL or missing references) //IL_0746: Unknown result type (might be due to invalid IL or missing references) //IL_0751: Unknown result type (might be due to invalid IL or missing references) //IL_075c: Unknown result type (might be due to invalid IL or missing references) //IL_075e: Unknown result type (might be due to invalid IL or missing references) //IL_0763: Unknown result type (might be due to invalid IL or missing references) //IL_076e: Unknown result type (might be due to invalid IL or missing references) //IL_0775: Unknown result type (might be due to invalid IL or missing references) //IL_0780: Unknown result type (might be due to invalid IL or missing references) //IL_0787: Unknown result type (might be due to invalid IL or missing references) //IL_0793: Unknown result type (might be due to invalid IL or missing references) //IL_079e: Unknown result type (might be due to invalid IL or missing references) //IL_07a5: Unknown result type (might be due to invalid IL or missing references) //IL_07b6: Unknown result type (might be due to invalid IL or missing references) //IL_07c1: Unknown result type (might be due to invalid IL or missing references) //IL_07cd: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07e3: Unknown result type (might be due to invalid IL or missing references) //IL_07e9: Unknown result type (might be due to invalid IL or missing references) //IL_07ee: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07fe: Unknown result type (might be due to invalid IL or missing references) //IL_080b: Expected O, but got Unknown //IL_05f6: Unknown result type (might be due to invalid IL or missing references) //IL_05fb: Unknown result type (might be due to invalid IL or missing references) //IL_05fc: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_0605: Unknown result type (might be due to invalid IL or missing references) //IL_060a: Unknown result type (might be due to invalid IL or missing references) //IL_060f: Unknown result type (might be due to invalid IL or missing references) //IL_0627: Unknown result type (might be due to invalid IL or missing references) //IL_062d: Unknown result type (might be due to invalid IL or missing references) //IL_0632: Unknown result type (might be due to invalid IL or missing references) //IL_0634: Unknown result type (might be due to invalid IL or missing references) //IL_0639: Unknown result type (might be due to invalid IL or missing references) //IL_0644: Unknown result type (might be due to invalid IL or missing references) //IL_064f: Unknown result type (might be due to invalid IL or missing references) //IL_0651: Unknown result type (might be due to invalid IL or missing references) //IL_0656: Unknown result type (might be due to invalid IL or missing references) //IL_0661: Unknown result type (might be due to invalid IL or missing references) //IL_0668: Unknown result type (might be due to invalid IL or missing references) //IL_0673: Unknown result type (might be due to invalid IL or missing references) //IL_067a: Unknown result type (might be due to invalid IL or missing references) //IL_0686: Unknown result type (might be due to invalid IL or missing references) //IL_0691: Unknown result type (might be due to invalid IL or missing references) //IL_0698: Unknown result type (might be due to invalid IL or missing references) //IL_06a9: Unknown result type (might be due to invalid IL or missing references) //IL_06b4: Unknown result type (might be due to invalid IL or missing references) //IL_06c0: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d6: Unknown result type (might be due to invalid IL or missing references) //IL_06dc: Unknown result type (might be due to invalid IL or missing references) //IL_06e1: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_06fe: Expected O, but got Unknown bool isCrit = ((BaseState)this).RollCrit(); Util.PlayAttackSpeedSound("ExecutionerSecondary", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); if (!((EntityState)this).isAuthority) { return; } ((EntityState)this).characterBody.SetAimTimer(2f); ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(spreadBloomValue * 1f); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 aimVector = ((Ray)(ref aimRay)).direction; if (Object.op_Implicit((Object)(object)lamp)) { lamp.IncrementFire(); } if (useAimAssist) { BullseyeSearch val = new BullseyeSearch(); val.teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()); val.filterByLoS = true; val.maxDistanceFilter = range; val.minAngleFilter = 0f; val.maxAngleFilter = aimSnapAngle; val.sortMode = (SortMode)3; val.filterByDistinctEntity = true; val.searchOrigin = ((Ray)(ref aimRay)).origin; val.searchDirection = ((Ray)(ref aimRay)).direction; val.RefreshCandidates(); targets = val.GetResults().Where((Func)Util.IsValid).Distinct((IEqualityComparer?)(object)default(EntityEqualityComparer)) .ToList(); if (targets.Count > 0 && Object.op_Implicit((Object)(object)targets[0].healthComponent)) { aimVector = ((Component)targets[0]).transform.position - ((Ray)(ref aimRay)).origin; } } BulletAttack val2 = new BulletAttack { aimVector = aimVector, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageType = (DamageType)16777216, damageColorIndex = (DamageColorIndex)0, minSpread = 0f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle, falloffModel = (FalloffModel)0, maxDistance = range, force = force, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procCoefficient = procCoefficient, radius = 1f, weapon = ((EntityState)this).gameObject, tracerEffectPrefab = tracerPrefab, hitEffectPrefab = hitPrefab, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask, spreadPitchScale = 0.2f, spreadYawScale = 0.2f }; val2 = ((!(skinNameToken == "SS2_SKIN_EXECUTIONER2_MASTERY")) ? new BulletAttack { aimVector = aimVector, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageType = (DamageType)16777216, damageColorIndex = (DamageColorIndex)0, minSpread = 0f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle, falloffModel = (FalloffModel)0, maxDistance = range, force = force, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procCoefficient = procCoefficient, radius = 1f, weapon = ((EntityState)this).gameObject, tracerEffectPrefab = tracerPrefab, hitEffectPrefab = hitPrefab, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask, spreadPitchScale = 0.2f, spreadYawScale = 0.2f } : new BulletAttack { aimVector = aimVector, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageType = (DamageType)16777216, damageColorIndex = (DamageColorIndex)0, minSpread = 0f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle, falloffModel = (FalloffModel)0, maxDistance = range, force = force, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procCoefficient = procCoefficient, radius = 1f, weapon = ((EntityState)this).gameObject, tracerEffectPrefab = tracerPrefabMastery, hitEffectPrefab = hitPrefabMastery, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask, spreadPitchScale = 0.2f, spreadYawScale = 0.2f }); val2.Fire(); if (((EntityState)this).skillLocator.secondary.stock == 1 && fullBurst) { BulletAttack val3 = new BulletAttack { aimVector = aimVector, origin = ((Ray)(ref aimRay)).origin, damage = damageBurstCoefficient * ((BaseState)this).damageStat / 2f, damageType = (DamageType)16777216, damageColorIndex = (DamageColorIndex)0, minSpread = 0.5f, maxSpread = 16f, falloffModel = (FalloffModel)0, maxDistance = range, bulletCount = 8u, force = force, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procCoefficient = procCoefficient * 0.5f, radius = 0.5f, weapon = ((EntityState)this).gameObject, tracerEffectPrefab = tracerExtraPrefab, hitEffectPrefab = hitPrefab, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask, spreadPitchScale = 1f, spreadYawScale = 1f }; val3 = ((!(skinNameToken == "SS2_SKIN_EXECUTIONER2_MASTERY")) ? new BulletAttack { aimVector = aimVector, origin = ((Ray)(ref aimRay)).origin, damage = damageBurstCoefficient * ((BaseState)this).damageStat / 2f, damageType = (DamageType)16777216, damageColorIndex = (DamageColorIndex)0, minSpread = 0.5f, maxSpread = 16f, falloffModel = (FalloffModel)0, maxDistance = range, bulletCount = 8u, force = force, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procCoefficient = procCoefficient * 0.5f, radius = 0.5f, weapon = ((EntityState)this).gameObject, tracerEffectPrefab = tracerPrefabMastery, hitEffectPrefab = hitPrefabMastery, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask, spreadPitchScale = 1f, spreadYawScale = 1f } : new BulletAttack { aimVector = aimVector, origin = ((Ray)(ref aimRay)).origin, damage = damageBurstCoefficient * ((BaseState)this).damageStat / 2f, damageType = (DamageType)16777216, damageColorIndex = (DamageColorIndex)0, minSpread = 0.5f, maxSpread = 16f, falloffModel = (FalloffModel)0, maxDistance = range, bulletCount = 8u, force = force, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procCoefficient = procCoefficient * 0.5f, radius = 0.5f, weapon = ((EntityState)this).gameObject, tracerEffectPrefab = tracerPrefabMastery, hitEffectPrefab = hitPrefabMastery, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask, spreadPitchScale = 1f, spreadYawScale = 1f }); val3.Fire(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class FireIonGunOld : BaseSkillState { [TokenModifier(/*Could not decode attribute arguments.*/)] public static float damageCoefficient = 3.8f; public static float procCoefficient = 1f; public static float baseDuration = 0.075f; public static float recoil = 0.6f; public static bool useAimAssist = true; public static float aimSnapAngle = 7.5f; public static float range = 200f; public static float force = 200f; public static float spreadBloomValue = 0.8f; public static int minimumShotBurst = 5; public static string muzzleString = "Muzzle"; public static GameObject ionEffectPrefab; [HideInInspector] public static GameObject muzzlePrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/MuzzleflashFMJ.prefab").WaitForCompletion(); [HideInInspector] public static GameObject tracerPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/TracerCommandoShotgun.prefab").WaitForCompletion(); [HideInInspector] public static GameObject hitPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/HitsparkCommandoShotgun.prefab").WaitForCompletion(); public int shotsFired; private float duration; private List targets; public override void OnEnter() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).PlayAnimation("Gesture, Override", "FireIonGun", "Secondary.playbackRate", duration); EffectManager.SimpleMuzzleFlash(muzzlePrefab, ((EntityState)this).gameObject, muzzleString, false); ((EntityState)this).characterBody.SetBuffCount(SS2Content.Buffs.bdExeCharge.buffIndex, 0); Shoot(); if (!((EntityState)this).characterBody.HasBuff(SS2Content.Buffs.BuffExecutionerSuperCharged) && !((EntityState)this).characterBody.HasBuff(SS2Content.Buffs.BuffExecutionerArmor)) { ((BaseSkillState)this).activatorSkillSlot.DeductStock(1); } shotsFired++; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { if (((BaseSkillState)this).activatorSkillSlot.stock > 0) { FireIonGunOld fireIonGunOld = new FireIonGunOld(); fireIonGunOld.shotsFired = shotsFired; ((BaseSkillState)fireIonGunOld).activatorSkillSlot = ((BaseSkillState)this).activatorSkillSlot; ((EntityState)this).outer.SetNextState((EntityState)(object)fireIonGunOld); } else { ((EntityState)this).outer.SetNextStateToMain(); } } } public override void OnExit() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); if (((EntityState)this).inputBank.skill2.down) { ((EntityState)this).characterBody.SetBuffCount(SS2Content.Buffs.bdExeCharge.buffIndex, 1); } } private void Shoot() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0192: 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_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017b: 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) bool isCrit = ((BaseState)this).RollCrit(); Util.PlayAttackSpeedSound("ExecutionerSecondary", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); if (!((EntityState)this).isAuthority) { return; } ((EntityState)this).characterBody.SetAimTimer(2f); ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(spreadBloomValue * 1f); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 aimVector = ((Ray)(ref aimRay)).direction; if (useAimAssist) { BullseyeSearch val = new BullseyeSearch(); val.teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()); val.filterByLoS = true; val.maxDistanceFilter = range; val.minAngleFilter = 0f; val.maxAngleFilter = aimSnapAngle; val.sortMode = (SortMode)3; val.filterByDistinctEntity = true; val.searchOrigin = ((Ray)(ref aimRay)).origin; val.searchDirection = ((Ray)(ref aimRay)).direction; val.RefreshCandidates(); targets = val.GetResults().Where((Func)Util.IsValid).Distinct((IEqualityComparer?)(object)default(EntityEqualityComparer)) .ToList(); if (targets.Count > 0 && Object.op_Implicit((Object)(object)targets[0].healthComponent)) { aimVector = ((Component)targets[0]).transform.position - ((Ray)(ref aimRay)).origin; } } new BulletAttack { aimVector = aimVector, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageType = (DamageType)16777216, damageColorIndex = (DamageColorIndex)0, minSpread = 0f, maxSpread = 0.2f, falloffModel = (FalloffModel)0, maxDistance = range, force = force, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procCoefficient = procCoefficient, radius = 1f, weapon = ((EntityState)this).gameObject, tracerEffectPrefab = tracerPrefab, hitEffectPrefab = hitPrefab, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask, spreadPitchScale = 0.2f, spreadYawScale = 0.2f }.Fire(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } } namespace EntityStates.Executioner { public class Armor : BaseSkillState { public override void OnEnter() { if (((EntityState)this).skillLocator.secondary.stock <= 0) { ((EntityState)this).skillLocator.secondary.AddOneStock(); } ((EntityState)this).characterBody.AddTimedBuff(SS2Content.Buffs.BuffExecutionerArmor, 4f); } } public class AxeSlam : BaseSkillState { [TokenModifier(/*Could not decode attribute arguments.*/)] public static float baseDamageCoefficient = 12f; public static float forceDamageCoefficient = 0.5f; public static float procCoefficient = 1f; public static float maxDuration = 10f; public static float upwardDuration = 0.9f; public static float slamRadius = 14f; public static float recoil = 8f; public static float rechargePerKill = 1f; public static float downwardAcceleration = -125f; public static AnimationCurveAsset upwardSpeedCoefficientCurve; public static GameObject slamEffect; public static GameObject axeEffect; private const float standardDownwardVelocity = -302.2f; private Animator animator; private Vector3 flyVector = Vector3.up; private AnimateShaderAlpha[] axeShaderAnimators = Array.Empty(); private bool hasDoneIntro; private CameraParamsOverrideHandle camOverrideHandle; private CharacterCameraParamsData slamCameraParams = new CharacterCameraParamsData { maxPitch = BlendableFloat.op_Implicit(70f), minPitch = BlendableFloat.op_Implicit(-70f), pivotVerticalOffset = BlendableFloat.op_Implicit(1f), idealLocalCameraPos = BlendableVector3.op_Implicit(slamCameraPosition), wallCushion = BlendableFloat.op_Implicit(0.1f) }; public static Vector3 slamCameraPosition = new Vector3(0f, 0f, -17.5f); public override void OnEnter() { //IL_0019: 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_0020: 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_003c: Expected O, but got Unknown //IL_0159: 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_0167: 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_017a: 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_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); ((EntityState)this).characterMotor.onHitGroundAuthority += new HitGroundDelegate(GroundSlam); Util.PlaySound("ExecutionerSpecialCast", ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("FullBody, Override", "Special1", "Special.playbackRate", upwardDuration); Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlay obj = ((Component)modelTransform).gameObject.AddComponent(); obj.duration = 0.5f; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = Resources.Load("Materials/matHuntressFlashBright"); obj.AddToCharacerModel(((Component)modelTransform).GetComponent()); } Transform val = ((BaseState)this).FindModelChild("AxeSpawn"); if (Object.op_Implicit((Object)(object)val)) { GameObject val2 = Object.Instantiate(axeEffect, val, false); axeShaderAnimators = val2.GetComponents(); AnimateShaderAlpha[] array = axeShaderAnimators; for (int i = 0; i < array.Length; i++) { array[i].timeMax = upwardDuration; } } if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.ArmorBoost); } if (((EntityState)this).isAuthority) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(); CameraParamsOverrideRequest val3 = default(CameraParamsOverrideRequest); val3.cameraParamsData = slamCameraParams; val3.priority = 0f; CameraParamsOverrideRequest val4 = val3; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val4, 0.15f); } } public override void Update() { ((EntityState)this).Update(); if (((EntityState)this).age > upwardDuration && !hasDoneIntro) { ((EntityState)this).PlayAnimation("FullBody, Override", "Special2"); hasDoneIntro = true; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { FixedUpdateAuthority(); } } private void FixedUpdateAuthority() { if (((EntityState)this).fixedAge >= maxDuration) { ((EntityState)this).outer.SetNextStateToMain(); } else { HandleMovement(); } } public void HandleMovement() { //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_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_00b1: 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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Clamp(0f, 11f, 0.5f * ((BaseState)this).moveSpeedStat); if (((EntityState)this).fixedAge < upwardDuration) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += flyVector * (num * upwardSpeedCoefficientCurve.value.Evaluate(((EntityState)this).fixedAge / upwardDuration) * Time.fixedDeltaTime); ((EntityState)this).characterMotor.velocity.y = 0f; } else { CharacterMotor characterMotor2 = ((EntityState)this).characterMotor; characterMotor2.velocity += flyVector * (((BaseState)this).moveSpeedStat * downwardAcceleration * Time.fixedDeltaTime); } } private void GroundSlam(ref HitGroundInfo hitGroundInfo) { //IL_0000: 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) //IL_005b: 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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_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_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0125: 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_012f: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0142: 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_014c: 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_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: 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_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) SphereSearch val = new SphereSearch(); List list = new List(); List list2 = new List(); float num = baseDamageCoefficient - baseDamageCoefficient * forceDamageCoefficient; float num2 = baseDamageCoefficient * forceDamageCoefficient * Mathf.Clamp(hitGroundInfo.velocity.y / -302.2f, 0f, 5f); num += num2; val.ClearCandidates(); val.origin = hitGroundInfo.position; val.radius = slamRadius; val.RefreshCandidates(); val.FilterCandidatesByDistinctHurtBoxEntities(); val.FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(((EntityState)this).teamComponent.teamIndex)); val.GetHurtBoxes(list); list2.Clear(); foreach (HurtBox item in list) { HealthComponent healthComponent = item.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent) && !list2.Contains(healthComponent)) { list2.Add(healthComponent); } } if (list2.Count <= 1) { num *= 2f; } bool crit = ((BaseState)this).RollCrit(); new BlastAttack { radius = slamRadius, procCoefficient = procCoefficient, position = hitGroundInfo.position, attacker = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).teamComponent.teamIndex, crit = crit, baseDamage = ((EntityState)this).characterBody.damage * num, damageColorIndex = (DamageColorIndex)0, falloffModel = (FalloffModel)0, attackerFiltering = (AttackerFiltering)2, damageType = (DamageType)262144 }.Fire(); ((BaseState)this).AddRecoil(-0.4f * recoil, -0.8f * recoil, -0.3f * recoil, 0.3f * recoil); if (Object.op_Implicit((Object)(object)slamEffect)) { EffectManager.SimpleEffect(slamEffect, hitGroundInfo.position, Quaternion.identity, true); } ((EntityState)this).outer.SetNextStateToMain(); } public override void OnExit() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_003e: 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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); ((EntityState)this).PlayAnimation("FullBody, Override", "Special4", "Special.playbackRate", 0.4f); ((EntityState)this).characterMotor.onHitGroundAuthority -= new HitGroundDelegate(GroundSlam); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags - 1); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 0.4f); } if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.ArmorBoost); } if (axeShaderAnimators.Length != 0) { ((Behaviour)axeShaderAnimators[1]).enabled = true; } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class Dash : BaseSkillState { public static float baseDuration = 0.9f; public static float speedMultiplier = 3f; public static float debuffRadius = 20f; [TokenModifier(/*Could not decode attribute arguments.*/)] public static float debuffDuration = 4f; public static GameObject dashEffect; public static float debuffCheckInterval = 1f / 30f; public static float hopVelocity; private float debuffCheckStopwatch; private float duration; private SphereSearch fearSearch; private List hits; private Animator animator; public override void OnEnter() { //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown //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) ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); duration = baseDuration; Util.PlayAttackSpeedSound("ExecutionerUtility", ((EntityState)this).gameObject, 1f); ((EntityState)this).PlayAnimation("FullBody, Override", "Utility", "Utility.playbackRate", duration * 1.75f); debuffCheckStopwatch = 0f; HopIfAirborne(); if (Object.op_Implicit((Object)(object)dashEffect)) { EffectManager.SimpleMuzzleFlash(dashEffect, ((EntityState)this).gameObject, "DashEffect", true); } hits = new List(); fearSearch = new SphereSearch(); fearSearch.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; fearSearch.radius = debuffRadius; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlay obj = ((Component)modelTransform).gameObject.AddComponent(); obj.duration = 1.5f * baseDuration; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = Resources.Load("Materials/matHuntressFlashBright"); obj.AddToCharacerModel(((Component)modelTransform).GetComponent()); } } private void CreateFearAoe() { //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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) hits.Clear(); fearSearch.ClearCandidates(); fearSearch.origin = ((EntityState)this).characterBody.corePosition; fearSearch.RefreshCandidates(); fearSearch.FilterCandidatesByDistinctHurtBoxEntities(); fearSearch.FilterCandidatesByHurtBoxTeam(TeamMask.GetUnprotectedTeams(((EntityState)this).teamComponent.teamIndex)); fearSearch.GetHurtBoxes(hits); foreach (HurtBox hit in hits) { HealthComponent healthComponent = hit.healthComponent; if (!Object.op_Implicit((Object)(object)healthComponent)) { continue; } SetStateOnHurt component = ((Component)healthComponent).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Type type = ((object)component.targetStateMachine.state).GetType(); if (type != typeof(StunState) && type != typeof(ShockState) && type != typeof(FrozenState)) { component.SetStun(-1f); } } CharacterBody val = healthComponent?.body; if (Object.op_Implicit((Object)(object)val) && (Object)(object)val != (Object)(object)((EntityState)this).characterBody && !((Enum)val.bodyFlags).HasFlag((Enum)(object)(BodyFlags)4) && val.baseNameToken != "BROTHER_BODY_NAME" && val.baseNameToken != "ULTRAMITH_NAME") { val.AddTimedBuff(SS2Content.Buffs.BuffFear, debuffDuration); } } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004e: 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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.isSprinting = true; if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += ((EntityState)this).characterDirection.forward * ((EntityState)this).characterBody.moveSpeed * speedMultiplier * Time.fixedDeltaTime; } if (NetworkServer.active) { debuffCheckStopwatch += Time.fixedDeltaTime; if (debuffCheckStopwatch >= debuffCheckInterval) { debuffCheckStopwatch -= debuffCheckInterval; CreateFearAoe(); } } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void HopIfAirborne() { if (!((EntityState)this).characterMotor.isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hopVelocity); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class AimIonGun : BaseSkillState { public static float baseDuration = 0.1f; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((EntityState)this).characterBody.attackSpeed; ((EntityState)this).PlayAnimation("Gesture, Override", "FireIonGunStart", "Secondary.playbackRate", duration); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (duration >= ((EntityState)this).fixedAge && ((EntityState)this).isAuthority) { FireIonGun fireIonGun = new FireIonGun(); ((BaseSkillState)fireIonGun).activatorSkillSlot = ((BaseSkillState)this).activatorSkillSlot; ((EntityState)this).outer.SetNextState((EntityState)(object)fireIonGun); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)0; } } public class FireIonGun : BaseSkillState { [TokenModifier(/*Could not decode attribute arguments.*/)] public static float damageCoefficient = 3.8f; public static float procCoefficient = 1f; public static float baseDuration = 0.075f; public static float recoil = 0.6f; public static bool useAimAssist = true; public static float aimSnapAngle = 7.5f; public static float range = 200f; public static float force = 200f; public static float spreadBloomValue = 0.8f; public static int minimumShotBurst = 5; public static string muzzleString = "Muzzle"; public static GameObject ionEffectPrefab; [HideInInspector] public static GameObject muzzlePrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/MuzzleflashFMJ.prefab").WaitForCompletion(); [HideInInspector] public static GameObject tracerPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/TracerCommandoShotgun.prefab").WaitForCompletion(); [HideInInspector] public static GameObject hitPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/HitsparkCommandoShotgun.prefab").WaitForCompletion(); public int shotsFired; private float duration; private List targets; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).PlayAnimation("Gesture, Override", "FireIonGun", "Secondary.playbackRate", duration); EffectManager.SimpleMuzzleFlash(muzzlePrefab, ((EntityState)this).gameObject, muzzleString, false); Shoot(); ((BaseSkillState)this).activatorSkillSlot.DeductStock(1); shotsFired++; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!(((EntityState)this).fixedAge >= duration) || !((EntityState)this).isAuthority) { return; } if (((BaseSkillState)this).activatorSkillSlot.stock > 0) { bool flag = ((BaseSkillState)this).IsKeyDownAuthority(); if ((shotsFired < minimumShotBurst && !(((EntityState)this).characterBody.HasBuff(SS2Content.Buffs.BuffExecutionerSuperCharged) | ((EntityState)this).characterBody.HasBuff(SS2Content.Buffs.BuffExecutionerArmor))) || flag) { FireIonGun fireIonGun = new FireIonGun(); fireIonGun.shotsFired = shotsFired; ((BaseSkillState)fireIonGun).activatorSkillSlot = ((BaseSkillState)this).activatorSkillSlot; ((EntityState)this).outer.SetNextState((EntityState)(object)fireIonGun); return; } } ((EntityState)this).outer.SetNextStateToMain(); } private void Shoot() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0192: 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_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: 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_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0244: 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_00a0: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017b: 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) bool isCrit = ((BaseState)this).RollCrit(); Util.PlayAttackSpeedSound("ExecutionerSecondary", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); if (!((EntityState)this).isAuthority) { return; } ((EntityState)this).characterBody.SetAimTimer(2f); ((BaseState)this).AddRecoil(-2f * recoil, 3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(spreadBloomValue * 1f); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 aimVector = ((Ray)(ref aimRay)).direction; if (useAimAssist) { BullseyeSearch val = new BullseyeSearch(); val.teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()); val.filterByLoS = true; val.maxDistanceFilter = range; val.minAngleFilter = 0f; val.maxAngleFilter = aimSnapAngle; val.sortMode = (SortMode)3; val.filterByDistinctEntity = true; val.searchOrigin = ((Ray)(ref aimRay)).origin; val.searchDirection = ((Ray)(ref aimRay)).direction; val.RefreshCandidates(); targets = val.GetResults().Where((Func)Util.IsValid).Distinct((IEqualityComparer?)(object)default(EntityEqualityComparer)) .ToList(); if (targets.Count > 0 && Object.op_Implicit((Object)(object)targets[0].healthComponent)) { aimVector = ((Component)targets[0]).transform.position - ((Ray)(ref aimRay)).origin; } } new BulletAttack { aimVector = aimVector, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageType = (DamageType)0, damageColorIndex = (DamageColorIndex)0, minSpread = 0f, maxSpread = 0.2f, falloffModel = (FalloffModel)0, maxDistance = range, force = force, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procCoefficient = procCoefficient, radius = 0.5f, weapon = ((EntityState)this).gameObject, tracerEffectPrefab = tracerPrefab, hitEffectPrefab = hitPrefab }.Fire(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class FirePistol : BaseSkillState { [TokenModifier(/*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("prefabs/effects/muzzleflashes/Muzzleflash1"); [HideInInspector] public static GameObject tracerPrefab = LegacyResourcesAPI.Load("prefabs/effects/tracers/tracercommandodefault"); [HideInInspector] public static GameObject hitPrefab = LegacyResourcesAPI.Load("prefabs/effects/HitsparkCommando"); private float duration; private float fireDuration; private string muzzleString; private bool hasFired; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireDuration = 0.1f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); muzzleString = "Muzzle"; hasFired = false; ((EntityState)this).PlayCrossfade("Gesture, Override", "Primary", "Primary.playbackRate", duration * 2.5f, 0.05f); Shoot(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!(((EntityState)this).fixedAge < duration) && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Shoot() { //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0142: 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_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; bool flag = ((BaseState)this).RollCrit(); string text = "ExecutionerPrimary"; if (flag) { 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) { _ = damageCoefficient; _ = ((BaseState)this).damageStat; Ray aimRay = ((BaseState)this).GetAimRay(); new BulletAttack { aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageType = (DamageType)0, damageColorIndex = (DamageColorIndex)0, minSpread = 0f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle, falloffModel = (FalloffModel)0, force = force, isCrit = flag, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 0.35f, weapon = ((EntityState)this).gameObject, tracerEffectPrefab = tracerPrefab, hitEffectPrefab = hitPrefab }.Fire(); } ((EntityState)this).characterBody.AddSpreadBloom(spreadBloom); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class FireTaser : BaseSkillState { [TokenModifier(/*Could not decode attribute arguments.*/)] public static float damageCoefficient; public static float procCoefficient = 0.75f; public static float baseDuration = 0.4f; public static float recoil = 0f; public static float spreadBloom = 0.75f; public static float force = 200f; [HideInInspector] public static GameObject muzzleEffectPrefab = Resources.Load("prefabs/effects/muzzleflashes/Muzzleflash1"); [HideInInspector] public static GameObject tracerPrefab = Resources.Load("prefabs/effects/tracers/tracercommandodefault"); [HideInInspector] public static GameObject hitPrefab = Resources.Load("prefabs/effects/HitsparkCommando"); private float duration; private float fireDuration; private string muzzleString; private bool hasFired; private Animator animator; private BullseyeSearch search; private float minAngleFilter; private float maxAngleFilter = 45f; private float attackRange = 28f; private List previousTargets; private int attackFireCount = 1; 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).characterBody.outOfCombatStopwatch = 0f; ((EntityState)this).PlayAnimation("Gesture, Override", "Primary", "Primary.playbackRate", duration); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireDuration) { Shoot(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Shoot() { //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_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: 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_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_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Expected O, but got Unknown //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) if (hasFired) { return; } hasFired = true; bool flag = ((BaseState)this).RollCrit(); string text = "ExecutionerPrimary"; if (flag) { text += "Crit"; } ((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 (NetworkServer.active) { float damageValue = damageCoefficient * ((BaseState)this).damageStat; Ray aimRay = ((BaseState)this).GetAimRay(); search = new BullseyeSearch(); search.searchOrigin = ((EntityState)this).transform.position; search.searchDirection = ((Ray)(ref aimRay)).direction; search.sortMode = (SortMode)1; search.teamMaskFilter = TeamMask.allButNeutral; ((TeamMask)(ref search.teamMaskFilter)).RemoveTeam(((BaseState)this).GetTeam()); search.filterByLoS = false; search.minAngleFilter = minAngleFilter; search.maxAngleFilter = maxAngleFilter; search.maxDistanceFilter = attackRange; search.RefreshCandidates(); HurtBox val = search.GetResults().FirstOrDefault(); if (Object.op_Implicit((Object)(object)val)) { Util.PlaySound(text, ((EntityState)this).gameObject); LightningOrb val2 = new LightningOrb(); val2.bouncedObjects = new List(); val2.attacker = ((EntityState)this).gameObject; val2.inflictor = ((EntityState)this).gameObject; val2.teamIndex = ((BaseState)this).GetTeam(); val2.damageValue = damageValue; val2.isCrit = flag; ((Orb)val2).origin = ((EntityState)this).transform.position; val2.bouncesRemaining = 4; val2.lightningType = (LightningType)0; val2.procCoefficient = procCoefficient; ((Orb)val2).target = val; val2.damageColorIndex = (DamageColorIndex)0; val2.damageType = (DamageType)0; OrbManager.instance.AddOrb((Orb)(object)val2); } } ((EntityState)this).characterBody.AddSpreadBloom(spreadBloom); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace EntityStates.Events { public class BlazingEventState : GenericEliteEvent { } public abstract class GenericEliteEvent : EventState { [SerializeField] public GameObject effectPrefab; [SerializeField] private EquipmentDef equipmentDef; [SerializeField] public string equipmentName; public static float fadeDuration = 7f; private GameObject effectInstance; private EventStateEffect eventStateEffect; public static event Action onEventClearGlobal; public override void OnEnter() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) ((EventState)this).OnEnter(); equipmentDef = EquipmentCatalog.GetEquipmentDef(EquipmentCatalog.FindEquipmentIndex(equipmentName)); if (Object.op_Implicit((Object)(object)effectPrefab)) { effectInstance = Object.Instantiate(effectPrefab); eventStateEffect = effectInstance.GetComponent(); if (Object.op_Implicit((Object)(object)eventStateEffect)) { eventStateEffect.intensityMultiplier = ((EventState)this).DiffScalingValue; } } } public override void StartEvent() { ((EventState)this).StartEvent(); if (Object.op_Implicit((Object)(object)eventStateEffect)) { eventStateEffect.OnEffectStart(); } CharacterBody.onBodyStartGlobal += MakeElite; Run.onRunDestroyGlobal += RunEndRemoveEliteEvent; Stage.onServerStageComplete += StageEndRemoveEliteEvent; } private void StageEndRemoveEliteEvent(Stage obj) { CharacterBody.onBodyStartGlobal -= MakeElite; Run.onRunDestroyGlobal -= RunEndRemoveEliteEvent; Stage.onServerStageComplete -= StageEndRemoveEliteEvent; } private void RunEndRemoveEliteEvent(Run obj) { CharacterBody.onBodyStartGlobal -= MakeElite; Run.onRunDestroyGlobal -= RunEndRemoveEliteEvent; Stage.onServerStageComplete -= StageEndRemoveEliteEvent; } public override void OnExit() { GenericEliteEvent.onEventClearGlobal?.Invoke(); ((EventState)this).OnExit(); if (Object.op_Implicit((Object)(object)eventStateEffect)) { eventStateEffect.OnEndingStart(fadeDuration); } if (((EventState)this).HasWarned) { CharacterBody.onBodyStartGlobal -= MakeElite; Run.onRunDestroyGlobal -= RunEndRemoveEliteEvent; Stage.onServerStageComplete -= StageEndRemoveEliteEvent; } } private void MakeElite(CharacterBody body) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Invalid comparison between Unknown and I4 //IL_00c7: 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_009e: Invalid comparison between Unknown and I4 //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Invalid comparison between Unknown and I4 if (!NetworkServer.active) { return; } TeamIndex teamIndex = body.teamComponent.teamIndex; bool flag = true; if (Object.op_Implicit((Object)(object)body.master)) { if (((Object)body.master).name.Contains("AffixEarthHealerMaster)") || ((Object)body.master).name == "AffixEarthHealerMaster(Clone)") { flag = false; } if (((Object)body.master).name.Contains("LemurianBruiserFireMaster") || ((Object)body.master).name.Contains("LemurianBruiserIceMaster")) { flag = false; } } if (!body.isPlayerControlled && (int)body.bodyFlags != 4 && !body.isChampion && ((int)teamIndex == 2 || (int)teamIndex == 4) && Util.CheckRoll(80f, 0f, (CharacterMaster)null) && flag) { body.inventory.SetEquipmentIndex(equipmentDef.equipmentIndex); body.maxHealth *= 4.7f; body.damage *= 2f; body.RecalculateStats(); } } } public class GlacialEventState : GenericEliteEvent { } public class MendingEventState : GenericEliteEvent { } public class OverloadingEventState : GenericEliteEvent { } public class EmpyreanBoss : GenericBossEventState { public static NemesisSpawnCard refSpawnCard; private Xoroshiro128Plus rng; private static List blacklist = new List { "JellyfishBody", "AcidLarvaBody", "MinorConstructBody", "HermitCrabBody" }; public override void OnEnter() { rng = Run.instance.spawnRng; base.OnEnter(); } public override void SpawnBoss() { //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Expected O, but got Unknown //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Expected O, but got Unknown //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("Director"); if (!Object.op_Implicit((Object)(object)val)) { return; } CombatDirector component = val.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } DirectorCard val2 = null; do { val2 = component.SelectMonsterCardForCombatShrine(20f * (float)Run.instance.loopClearCount * (float)Run.instance.loopClearCount + 40f); Debug.Log((object)(((Object)val2.spawnCard.prefab.GetComponent().bodyPrefab).name + " : CHOSEN MONSTER ATTEMPT")); } while (blacklist.Contains(((Object)val2.spawnCard.prefab.GetComponent().bodyPrefab).name)); val2.spawnCard.prefab.GetComponent().bodyPrefab.GetComponent(); if (!Object.op_Implicit((Object)(object)characterSpawnCard)) { return; } Debug.Log((object)((Object)val2.spawnCard.prefab).name); SpawnCard val3 = Object.Instantiate(val2.spawnCard); Transform val4 = null; MonsterSpawnDistance val5 = (MonsterSpawnDistance)0; if (Object.op_Implicit((Object)(object)chosenPlayer)) { val4 = chosenPlayer.GetComponent().coreTransform; } if (Object.op_Implicit((Object)(object)TeleporterInteraction.instance)) { val4 = ((Component)TeleporterInteraction.instance).transform; val5 = (MonsterSpawnDistance)1; } if (!Object.op_Implicit((Object)(object)val4)) { SS2Log.Error("Unable to spawn boss. Returning.", 79, "SpawnBoss"); return; } DirectorPlacementRule val6 = new DirectorPlacementRule { spawnOnTarget = val4, placementMode = (PlacementMode)3 }; DirectorCore.GetMonsterSpawnDistance(val5, ref val6.minDistance, ref val6.maxDistance); DirectorSpawnRequest val7 = new DirectorSpawnRequest(val3, val6, rng); val7.teamIndexOverride = (TeamIndex)2; val7.ignoreTeamMemberLimit = true; CombatSquad combatSquad = null; val7.onSpawnedServer = delegate(SpawnResult spawnResult) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)combatSquad)) { combatSquad = Object.Instantiate(GenericBossEventState.encounterPrefab).GetComponent(); } CharacterMaster component2 = spawnResult.spawnedInstance.GetComponent(); bossBody = component2.GetBody(); combatSquad.AddMember(component2); UnityEvent onBodyDeath = component2.onBodyDeath; EmpyreanBoss empyreanBoss = this; onBodyDeath.AddListener(new UnityAction(empyreanBoss.OnBodyDeath)); }; DirectorCore.instance.TrySpawnObject(val7); if (Object.op_Implicit((Object)(object)combatSquad)) { ((Component)combatSquad).GetComponent().defaultTeam = (TeamIndex)2; NetworkServer.Spawn(((Component)combatSquad).gameObject); foreach (CharacterMaster members in combatSquad.membersList) { members.inventory.GiveItem(Items.BoostHp, 250); members.inventory.GiveItem(Items.BoostDamage, 80); members.inventory.SetEquipmentIndex(SS2Content.Equipments.AffixEmpyrean.equipmentIndex); } } Object.Destroy((Object)(object)val3); } } public class EmpyreanBossHavoc : EmpyreanBoss { } public class GenericBossEventState : EventState { public static GameObject encounterPrefab; [SerializeField] public CharacterSpawnCard characterSpawnCard; [SerializeField] public string spawnDistanceString; public static float fadeDuration = 7f; private MonsterSpawnDistance spawnDistance; private Xoroshiro128Plus rng; public GameObject chosenPlayer; public CharacterBody bossBody; public override bool OverrideTimer => true; public static event Action onBossDefeatedGlobal; public override void OnEnter() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) ((EventState)this).OnEnter(); rng = Run.instance.spawnRng; if (!Enum.TryParse(spawnDistanceString, out spawnDistance)) { spawnDistance = (MonsterSpawnDistance)0; } if (NetworkServer.active) { FindSpawnTarget(); } } public override void FixedUpdate() { ((EventState)this).FixedUpdate(); } public override void StartEvent() { ((EventState)this).StartEvent(); if (NetworkServer.active) { SpawnBoss(); } } private void FindSpawnTarget() { ReadOnlyCollection instances = PlayerCharacterMasterController.instances; List list = new List(); foreach (PlayerCharacterMasterController item in instances) { if (item.master.hasBody) { list.Add(item); } } if (list.Count > 0) { PlayerCharacterMasterController val = rng.NextElementUniform(list); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.body)) { chosenPlayer = ((Component)val.body).gameObject; } } } public virtual void SpawnBoss() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_0094: 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_00b9: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)characterSpawnCard)) { return; } CharacterSpawnCard val = Object.Instantiate(characterSpawnCard); Transform val2 = null; _ = spawnDistance; if (Object.op_Implicit((Object)(object)chosenPlayer)) { val2 = chosenPlayer.GetComponent().coreTransform; } if (Object.op_Implicit((Object)(object)TeleporterInteraction.instance)) { val2 = ((Component)TeleporterInteraction.instance).transform; } if (!Object.op_Implicit((Object)(object)val2)) { SS2Log.Error("Unable to spawn boss. Returning.", 105, "SpawnBoss"); return; } DirectorPlacementRule val3 = new DirectorPlacementRule { spawnOnTarget = val2, placementMode = (PlacementMode)3 }; DirectorCore.GetMonsterSpawnDistance(spawnDistance, ref val3.minDistance, ref val3.maxDistance); DirectorSpawnRequest val4 = new DirectorSpawnRequest((SpawnCard)(object)val, val3, rng); val4.teamIndexOverride = (TeamIndex)2; val4.ignoreTeamMemberLimit = true; CombatSquad combatSquad = null; val4.onSpawnedServer = delegate(SpawnResult spawnResult) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)combatSquad)) { combatSquad = Object.Instantiate(encounterPrefab).GetComponent(); } CharacterMaster component = spawnResult.spawnedInstance.GetComponent(); bossBody = component.GetBody(); combatSquad.AddMember(component); UnityEvent onBodyDeath = component.onBodyDeath; GenericBossEventState genericBossEventState = this; onBodyDeath.AddListener(new UnityAction(genericBossEventState.OnBodyDeath)); }; DirectorCore.instance.TrySpawnObject(val4); if (Object.op_Implicit((Object)(object)combatSquad)) { ((Component)combatSquad).GetComponent().defaultTeam = (TeamIndex)2; NetworkServer.Spawn(((Component)combatSquad).gameObject); } Object.Destroy((Object)(object)val); } public virtual void OnBodyDeath() { GenericBossEventState.onBossDefeatedGlobal?.Invoke(bossBody); ((EntityState)this).outer.SetNextState((EntityState)(object)new IdleRestOfStage()); } public override void OnExit() { ((EventState)this).OnExit(); } public override void OnSerialize(NetworkWriter writer) { ((EntityState)this).OnSerialize(writer); writer.Write(chosenPlayer); } public override void OnDeserialize(NetworkReader reader) { ((EntityState)this).OnDeserialize(reader); chosenPlayer = reader.ReadGameObject(); } } public class GenericNemesisEvent : EventState { public static GameObject musicOverridePrefab; [SerializeField] public MusicTrackDef introTrack; [SerializeField] public MusicTrackDef mainTrack; [SerializeField] public MusicTrackDef outroTrack; public static GameObject encounterPrefab; [SerializeField] public NemesisSpawnCard spawnCard; [SerializeField] public string spawnDistanceString; public static float fadeDuration = 7f; private MonsterSpawnDistance spawnDistance; private Xoroshiro128Plus rng; private MusicTrackOverride musicTrack; public GameObject chosenPlayer; public CharacterBody nemesisBossBody; public override bool OverrideTimer => true; public static event Action onNemesisDefeatedGlobal; public override void OnEnter() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) ((EventState)this).OnEnter(); rng = Run.instance.spawnRng; if (!Enum.TryParse(spawnDistanceString, out spawnDistance)) { spawnDistance = (MonsterSpawnDistance)0; } if (NetworkServer.active) { FindSpawnTarget(); } if (Object.op_Implicit((Object)(object)musicOverridePrefab) && Object.op_Implicit((Object)(object)introTrack) && Object.op_Implicit((Object)(object)mainTrack)) { musicTrack = Object.Instantiate(musicOverridePrefab).GetComponent(); musicTrack.track = introTrack; } } public override void FixedUpdate() { ((EventState)this).FixedUpdate(); } public override void StartEvent() { ((EventState)this).StartEvent(); if (Object.op_Implicit((Object)(object)musicOverridePrefab)) { musicTrack.track = mainTrack; } if (NetworkServer.active) { SpawnNemesisBoss(); } } private void FindSpawnTarget() { ReadOnlyCollection instances = PlayerCharacterMasterController.instances; List list = new List(); foreach (PlayerCharacterMasterController item in instances) { if (item.master.hasBody) { list.Add(item); } } if (list.Count > 0) { PlayerCharacterMasterController val = rng.NextElementUniform(list); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.body)) { chosenPlayer = ((Component)val.body).gameObject; } } } public virtual void SpawnNemesisBoss() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Expected O, but got Unknown //IL_0097: 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_00bc: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)spawnCard)) { return; } NemesisSpawnCard nemesisSpawnCard = Object.Instantiate(spawnCard); Transform val = null; _ = spawnDistance; if (Object.op_Implicit((Object)(object)chosenPlayer)) { val = chosenPlayer.GetComponent().coreTransform; } if (Object.op_Implicit((Object)(object)TeleporterInteraction.instance)) { val = ((Component)TeleporterInteraction.instance).transform; } if (!Object.op_Implicit((Object)(object)val)) { SS2Log.Error("Unable to spawn Nemesis Event. Returning.", 136, "SpawnNemesisBoss"); return; } DirectorPlacementRule val2 = new DirectorPlacementRule { spawnOnTarget = val, placementMode = (PlacementMode)3 }; DirectorCore.GetMonsterSpawnDistance(spawnDistance, ref val2.minDistance, ref val2.maxDistance); DirectorSpawnRequest val3 = new DirectorSpawnRequest((SpawnCard)(object)nemesisSpawnCard, val2, rng); val3.teamIndexOverride = (TeamIndex)2; val3.ignoreTeamMemberLimit = true; CombatSquad combatSquad = null; val3.onSpawnedServer = delegate(SpawnResult spawnResult) { //IL_0022: 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_00a3: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)combatSquad)) { combatSquad = Object.Instantiate(encounterPrefab).GetComponent(); } CharacterMaster component = spawnResult.spawnedInstance.GetComponent(); nemesisBossBody = component.GetBody(); component.onBodyStart += delegate(CharacterBody body) { ((Component)body).gameObject.AddComponent(); }; NetMessageExtensions.Send((INetMessage)(object)new NemesisSpawnCard.SyncBaseStats(nemesisBossBody), (NetworkDestination)1); combatSquad.AddMember(component); UnityEvent onBodyDeath = component.onBodyDeath; GenericNemesisEvent genericNemesisEvent = this; onBodyDeath.AddListener(new UnityAction(genericNemesisEvent.OnBodyDeath)); }; DirectorCore.instance.TrySpawnObject(val3); if (Object.op_Implicit((Object)(object)combatSquad)) { ((Component)combatSquad).GetComponent().defaultTeam = (TeamIndex)2; NetworkServer.Spawn(((Component)combatSquad).gameObject); } Object.Destroy((Object)(object)nemesisSpawnCard); } public virtual void OnBodyDeath() { GenericNemesisEvent.onNemesisDefeatedGlobal?.Invoke(nemesisBossBody); ((EntityState)this).outer.SetNextState((EntityState)(object)new IdleRestOfStage()); } public override void OnExit() { ((EventState)this).OnExit(); if (Object.op_Implicit((Object)(object)musicTrack)) { EntityState.Destroy((Object)(object)((Component)musicTrack).gameObject); } } public override void OnSerialize(NetworkWriter writer) { ((EntityState)this).OnSerialize(writer); writer.Write(chosenPlayer); } public override void OnDeserialize(NetworkReader reader) { ((EntityState)this).OnDeserialize(reader); chosenPlayer = reader.ReadGameObject(); } } public class IdleRestOfStage : EntityState { } public class NemCommandoBossState : GenericNemesisEvent { } public class NemMercenaryBossState : GenericNemesisEvent { } [DisabledContent] public class NemmandoBossState : GenericNemesisEvent { } public class StageEvent : EventState { public override void FixedUpdate() { if (!((EventState)this).HasWarned && ((EntityState)this).fixedAge >= base.warningDur) { ((EventState)this).StartEvent(); } } } public class AshstormState : GenericStormState { } public class BlizzardState : GenericStormState { } public class FogRoostState : GenericWeatherState { } public class FogSwampState : GenericWeatherState { } public abstract class GenericStormState : EventState { [SerializeField] public GameObject effectPrefab; [SerializeField] public BuffDef stormBuffDef; [SerializeField] public GameObject encounterPrefab; [SerializeField] public float monsterCreditMultiplier = 20f; [SerializeField] public static float fadeDuration = 7f; public static GameObject SArain; private GameObject effectInstance; private EventStateEffect eventStateEffect; public override void OnEnter() { //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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Invalid comparison between Unknown and I4 //IL_0054: Unknown result type (might be due to invalid IL or missing references) ((EventState)this).OnEnter(); GameObject value = null; SS2EventCard sS2EventCard = (SS2EventCard)(object)base.eventCard; Stage stageEnumFromSceneDef = DirectorAPI.GetStageEnumFromSceneDef(SceneInfo.instance.sceneDef); if ((int)stageEnumFromSceneDef == 1) { string key = SceneInfo.instance.sceneDef.baseSceneName.ToLowerInvariant(); sS2EventCard.customStageToFXPrefab.TryGetValue(key, out value); } else { sS2EventCard.vanillaStageToFXPrefab.TryGetValue(stageEnumFromSceneDef, out value); } if (!Object.op_Implicit((Object)(object)value)) { value = sS2EventCard.fallbackVFX; } if (Object.op_Implicit((Object)(object)value)) { effectInstance = Object.Instantiate(value); eventStateEffect = effectInstance.GetComponent(); if (Object.op_Implicit((Object)(object)eventStateEffect)) { eventStateEffect.intensityMultiplier = ((EventState)this).DiffScalingValue; } } } public override void StartEvent() { //IL_00bb: Unknown result type (might be due to invalid IL or missing references) ((EventState)this).StartEvent(); if (Object.op_Implicit((Object)(object)eventStateEffect)) { eventStateEffect.OnEffectStart(); } if (NetworkServer.active) { foreach (TeamComponent item in TeamComponent.GetTeamMembers((TeamIndex)2).Concat(TeamComponent.GetTeamMembers((TeamIndex)3)).Concat(TeamComponent.GetTeamMembers((TeamIndex)4))) { BuffEnemy(item.body); } } if (Object.op_Implicit((Object)(object)encounterPrefab)) { NetworkServer.Spawn(encounterPrefab); CombatDirector component = encounterPrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)Stage.instance)) { DifficultyDef difficultyDef = DifficultyCatalog.GetDifficultyDef(Run.instance.ruleBook.FindDifficulty()); float num = difficultyDef.scalingValue; if (difficultyDef.nameToken == "SS2_DIFFICULTY_TYPHOON_NAME") { num += 1f; } float num2 = monsterCreditMultiplier * Run.instance.difficultyCoefficient * num; num2 = 40f; WeightedSelection val = Util.CreateReasonableDirectorCardSpawnList(num2, component.maximumNumberToSpawnBeforeSkipping, 6); if (val != null && component.rng != null) { DirectorCard val2 = val.Evaluate(component.rng.nextNormalizedFloat); if (val2 != null) { component.monsterCredit += num2; component.OverrideCurrentMonsterCard(val2); component.monsterSpawnTimer = 0f; } else { Debug.Log((object)"missing director card"); } } else { Debug.Log((object)"weightedselection null"); } } } CharacterBody.onBodyStartGlobal += BuffEnemy; Run.onRunDestroyGlobal += RunEndRemoveStorms; Stage.onServerStageComplete += StageEndRemoveStorms; } private void StageEndRemoveStorms(Stage obj) { CharacterBody.onBodyStartGlobal -= BuffEnemy; Run.onRunDestroyGlobal -= RunEndRemoveStorms; Stage.onServerStageComplete -= StageEndRemoveStorms; } private void RunEndRemoveStorms(Run obj) { CharacterBody.onBodyStartGlobal -= BuffEnemy; Run.onRunDestroyGlobal -= RunEndRemoveStorms; Stage.onServerStageComplete -= StageEndRemoveStorms; } public override void OnExit() { ((EventState)this).OnExit(); if (Object.op_Implicit((Object)(object)eventStateEffect)) { eventStateEffect.OnEndingStart(fadeDuration); } if (!((EventState)this).HasWarned) { return; } CharacterBody.onBodyStartGlobal -= BuffEnemy; Run.onRunDestroyGlobal -= RunEndRemoveStorms; Stage.onServerStageComplete -= StageEndRemoveStorms; if (!NetworkServer.active) { return; } foreach (CharacterBody readOnlyInstances in CharacterBody.readOnlyInstancesList) { if (readOnlyInstances.HasBuff(stormBuffDef ?? SS2Content.Buffs.BuffStorm)) { readOnlyInstances.RemoveBuff(stormBuffDef ?? SS2Content.Buffs.BuffStorm); } } } private void BuffEnemy(CharacterBody body) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Invalid comparison between Unknown and I4 //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Invalid comparison between Unknown and I4 //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Invalid comparison between Unknown and I4 //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Invalid comparison between Unknown and I4 if (NetworkServer.active) { TeamIndex teamIndex = body.teamComponent.teamIndex; if (!body.isPlayerControlled && (int)body.bodyFlags != 4 && ((int)teamIndex == 2 || (int)teamIndex == 3 || (int)teamIndex == 4) && !body.HasBuff(stormBuffDef ?? SS2Content.Buffs.BuffStorm)) { body.AddBuff(stormBuffDef ?? SS2Content.Buffs.BuffStorm); } } } } public abstract class GenericWeatherState : EventState { [SerializeField] public GameObject effectPrefab; [SerializeField] public static float fadeDuration = 7f; private GameObject effectInstance; private EventStateEffect eventStateEffect; public override void OnEnter() { ((EventState)this).OnEnter(); if (Object.op_Implicit((Object)(object)effectPrefab)) { effectInstance = Object.Instantiate(effectPrefab); eventStateEffect = effectInstance.GetComponent(); if (Object.op_Implicit((Object)(object)eventStateEffect)) { eventStateEffect.intensityMultiplier = ((EventState)this).DiffScalingValue; } } } public override void StartEvent() { ((EventState)this).StartEvent(); if (Object.op_Implicit((Object)(object)eventStateEffect)) { eventStateEffect.OnEffectStart(); } Run.onRunDestroyGlobal += RunEndRemoveWeather; Stage.onServerStageComplete += StageEndRemoveWeather; } private void StageEndRemoveWeather(Stage obj) { Run.onRunDestroyGlobal -= RunEndRemoveWeather; Stage.onServerStageComplete -= StageEndRemoveWeather; } private void RunEndRemoveWeather(Run obj) { Run.onRunDestroyGlobal -= RunEndRemoveWeather; Stage.onServerStageComplete -= StageEndRemoveWeather; } public override void OnExit() { ((EventState)this).OnExit(); if (Object.op_Implicit((Object)(object)eventStateEffect)) { eventStateEffect.OnEndingStart(fadeDuration); } if (((EventState)this).HasWarned) { Run.onRunDestroyGlobal -= RunEndRemoveWeather; Stage.onServerStageComplete -= StageEndRemoveWeather; } } } public class HavocStormState : GenericStormState { } public class PurpleRainstormState : GenericStormState { } public class SandstormState : GenericStormState { } public class ThunderstormState : GenericStormState { } } namespace EntityStates.ShockDrone { public class ShockDroneFire : BaseSkillState { public static float duration = 1f; public static float damageCoefficient = 1f; public static float radius = 12f; public static string muzzleString = "Muzzle"; public static GameObject blastEffect; private ChildLocator childLocator; public override void OnEnter() { ((BaseState)this).OnEnter(); childLocator = ((EntityState)this).GetModelChildLocator(); } public override void OnExit() { ((EntityState)this).OnExit(); if (((EntityState)this).isAuthority) { FireShock(); } } public void FireShock() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: 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_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_004b: 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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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_00a2: Unknown result type (might be due to invalid IL or missing references) Vector3 position = childLocator.FindChild(muzzleString).position; bool crit = ((BaseState)this).RollCrit(); new BlastAttack { radius = radius, procCoefficient = 1f, position = position, attacker = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).teamComponent.teamIndex, crit = crit, baseDamage = damageCoefficient * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)11, falloffModel = (FalloffModel)0, attackerFiltering = (AttackerFiltering)2, damageType = (DamageType)16777216 }.Fire(); EffectManager.SimpleEffect(blastEffect, position, Quaternion.identity, true); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && duration >= ((EntityState)this).fixedAge) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } } namespace EntityStates.CloneDrone { public class CloneDroneCook : BaseSkillState { public static float baseDuration = 4f; public static string spawnMuzzle = "Muzzle"; public static string spawnMuzzle2 = "Muzzle2"; public static float dropUpVelocityStrength = -5f; public static float dropForwardVelocityStrength = 3f; public static GameObject targetIndicatorVfxPrefab; public GenericPickupController gpc; public GameObject target; private ChildLocator childLocator; private ItemTier pickupTier; private float duration = 4f; private CharacterModel charModel; private Material lightOn = SS2Assets.LoadAsset("matCloneDroneLight", SS2Bundle.Interactables); private Material lightOff = SS2Assets.LoadAsset("matCloneDroneNoLight", SS2Bundle.Interactables); private GameObject targetIndicatorVfxInstance; private GameObject sparksObj; private GameObject lightObj; private GameObject startObj; private GameObject glowMesh; private MeshRenderer glowMeshRenderer; private Material glowMeshMat; private float originalMoveSpeed; public override void OnEnter() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Expected I4, but got Unknown //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_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); childLocator = ((EntityState)this).GetModelChildLocator(); charModel = ((Component)childLocator).gameObject.GetComponent(); targetIndicatorVfxPrefab = SS2Assets.LoadAsset("DuplicatingCircleVFX", SS2Bundle.Interactables); gpc = target.GetComponent(); pickupTier = ((PickupIndex)(ref gpc.pickupIndex)).pickupDef.itemTier; originalMoveSpeed = ((EntityState)this).characterBody.moveSpeed; if (Object.op_Implicit((Object)(object)targetIndicatorVfxPrefab)) { targetIndicatorVfxInstance = Object.Instantiate(targetIndicatorVfxPrefab, ((Component)gpc).gameObject.transform.position, Quaternion.identity); ChildLocator component = targetIndicatorVfxInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Transform val = component.FindChild("LineEnd"); if (Object.op_Implicit((Object)(object)val)) { val.position = ((BaseState)this).FindModelChild(spawnMuzzle).position; val.SetParent(((Component)((BaseState)this).FindModelChild(spawnMuzzle)).transform); } Transform val2 = component.FindChild("Sparks"); if (Object.op_Implicit((Object)(object)val2)) { if ((Object)(object)((Component)val2).GetComponent() != (Object)null) { ((Component)val2).GetComponent().startColor = ((PickupIndex)(ref gpc.pickupIndex)).GetPickupColor(); } val2.position = ((BaseState)this).FindModelChild(spawnMuzzle2).position; val2.SetParent(((Component)((BaseState)this).FindModelChild(spawnMuzzle2)).transform); sparksObj = ((Component)val2).gameObject; } Transform val3 = component.FindChild("Light"); if (Object.op_Implicit((Object)(object)val3)) { if ((Object)(object)((Component)val3).GetComponent() != (Object)null) { ((Component)val3).GetComponent().color = ((PickupIndex)(ref gpc.pickupIndex)).GetPickupColor(); } val3.position = ((BaseState)this).FindModelChild(spawnMuzzle2).position; val3.SetParent(((Component)((BaseState)this).FindModelChild(spawnMuzzle2)).transform); lightObj = ((Component)val3).gameObject; } Transform val4 = component.FindChild("StartEffect"); if (Object.op_Implicit((Object)(object)val4)) { val4.position = ((BaseState)this).FindModelChild(spawnMuzzle).position; val4.SetParent(((Component)((BaseState)this).FindModelChild(spawnMuzzle)).transform); startObj = ((Component)val4).gameObject; } } } float num = 60f; duration = baseDuration; ItemTier val5 = pickupTier; switch ((int)val5) { case 0: if (Object.op_Implicit((Object)(object)charModel)) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightT1", SS2Bundle.Interactables); } break; case 1: duration *= 1.5f; num *= 1.5f; if (Object.op_Implicit((Object)(object)charModel)) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightT2", SS2Bundle.Interactables); } break; case 2: duration *= 2f; num *= 2f; if (Object.op_Implicit((Object)(object)charModel)) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightT3", SS2Bundle.Interactables); } break; case 4: duration *= 2f; num *= 2f; if (Object.op_Implicit((Object)(object)charModel)) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightT4", SS2Bundle.Interactables); } break; case 6: if (Object.op_Implicit((Object)(object)charModel)) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightVoid", SS2Bundle.Interactables); } break; case 7: duration *= 1.5f; num *= 1.5f; if (Object.op_Implicit((Object)(object)charModel)) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightVoid", SS2Bundle.Interactables); } break; case 8: duration *= 2f; num *= 2f; if (Object.op_Implicit((Object)(object)charModel)) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightVoid", SS2Bundle.Interactables); } break; case 9: duration *= 2f; num *= 2f; if (Object.op_Implicit((Object)(object)charModel)) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightVoid", SS2Bundle.Interactables); } break; case 3: if (Object.op_Implicit((Object)(object)charModel)) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightLunar", SS2Bundle.Interactables); } break; default: if (Object.op_Implicit((Object)(object)charModel)) { if (((PickupIndex)(ref gpc.pickupIndex)).pickupDef.isLunar) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightLunar", SS2Bundle.Interactables); } else { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightEquip", SS2Bundle.Interactables); } } break; } ((EntityState)this).skillLocator.primary.stock = 0; GenericSkill primary = ((EntityState)this).skillLocator.primary; primary.rechargeStopwatch -= num; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.moveSpeed = originalMoveSpeed * 0.1f; if (!Object.op_Implicit((Object)(object)target)) { GenericSkill primary = ((EntityState)this).skillLocator.primary; primary.rechargeStopwatch *= 0.25f; ((EntityState)this).outer.SetNextStateToMain(); } else if (duration <= ((EntityState)this).fixedAge) { ((EntityState)this).outer.SetNextStateToMain(); if (NetworkServer.active) { CreateClone(); } } } public void CreateClone() { //IL_0006: 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_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0020: 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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) PickupDropletController.CreatePickupDroplet(gpc.pickupIndex, ((EntityState)this).transform.position, Vector3.up * dropUpVelocityStrength + ((EntityState)this).transform.forward * dropForwardVelocityStrength); } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)targetIndicatorVfxInstance)) { EntityState.Destroy((Object)(object)targetIndicatorVfxInstance); targetIndicatorVfxInstance = null; } ((EntityState)this).characterBody.moveSpeed = originalMoveSpeed; ((EntityState)this).skillLocator.primary.DeductStock(1); if ((Object)(object)sparksObj != (Object)null) { EntityState.Destroy((Object)(object)sparksObj); } if ((Object)(object)lightObj != (Object)null) { EntityState.Destroy((Object)(object)lightObj); } if ((Object)(object)startObj != (Object)null) { EntityState.Destroy((Object)(object)startObj); } if (Object.op_Implicit((Object)(object)charModel)) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneNoLight", SS2Bundle.Interactables); } } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write(target); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); target = reader.ReadGameObject(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } public class CloneDroneSearch : BaseSkillState { public static float duration = 0.6f; public static float radius = 18f; public static string muzzleString = "Muzzle"; public static GameObject blastEffect; private ChildLocator childLocator; private SphereSearch sphereSearch; public GenericPickupController gpc; public ItemTier pickupTier; public override void OnEnter() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_0057: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); childLocator = ((EntityState)this).GetModelChildLocator(); if (((EntityState)this).isAuthority) { sphereSearch = new SphereSearch(); sphereSearch.origin = ((EntityState)this).transform.position; sphereSearch.mask = ((LayerIndex)(ref LayerIndex.pickups)).mask; sphereSearch.queryTriggerInteraction = (QueryTriggerInteraction)2; sphereSearch.radius = radius; Search(); } } public void Search() { //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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) List list = CollectionPool>.RentCollection(); sphereSearch.mask = CommonMasks.interactable; sphereSearch.ClearCandidates(); sphereSearch.RefreshCandidates(); sphereSearch.FilterCandidatesByColliderEntities(); sphereSearch.OrderCandidatesByDistance(); sphereSearch.FilterCandidatesByDistinctColliderEntities(); sphereSearch.GetColliders(list); List list2 = new List(); foreach (Collider item in list) { GameObject gameObject = ((Component)((Component)item).transform.parent).gameObject; list2.Add(gameObject); } GameObject val = null; foreach (GameObject item2 in list2) { if (!((Object)(object)item2.GetComponent() != (Object)null)) { continue; } GenericPickupController component = item2.GetComponent(); if (IsWhitelistTier(((PickupIndex)(ref component.pickupIndex)).pickupDef)) { float num = Vector3.Distance(((EntityState)this).transform.position, item2.transform.position); if ((Object)(object)val == (Object)null || num < Vector3.Distance(((EntityState)this).transform.position, val.transform.position)) { val = item2; } } } if ((Object)(object)val != (Object)null) { gpc = val.GetComponent(); Clone(); } else { ((EntityState)this).outer.SetNextStateToMain(); } } public bool IsWhitelistTier(PickupDef pickupDef) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Invalid comparison between Unknown and I4 //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Invalid comparison between Unknown and I4 //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Invalid comparison between Unknown and I4 //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Invalid comparison between Unknown and I4 //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Invalid comparison between Unknown and I4 //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Invalid comparison between Unknown and I4 //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Invalid comparison between Unknown and I4 if ((int)pickupTier == 0 || (int)pickupTier == 1 || (int)pickupTier == 2 || (int)pickupTier == 4 || (int)pickupTier == 6 || (int)pickupTier == 7 || (int)pickupTier == 8 || (int)pickupTier == 9) { return true; } return false; } public override void OnExit() { ((EntityState)this).OnExit(); _ = (Object)(object)gpc != (Object)null; } public void Clone() { CloneDroneCook cloneDroneCook = new CloneDroneCook(); cloneDroneCook.target = ((Component)gpc).gameObject; ((EntityState)this).outer.SetNextState((EntityState)(object)cloneDroneCook); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)4; } } } namespace EntityStates.Cyborg2 { public class DetonateMagnetBall : BaseSkillState { public static float baseDuration = 0.33f; private float duration; private ProjectileRemoteDetonator.RemoteDetonatorOwnership projectileOwnership; public override void OnEnter() { ((BaseState)this).OnEnter(); projectileOwnership = ((EntityState)this).GetComponent(); if (!Object.op_Implicit((Object)(object)projectileOwnership)) { ((EntityState)this).outer.SetNextStateToMain(); return; } projectileOwnership.Detonate(); duration = baseDuration / ((BaseState)this).attackSpeedStat; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)projectileOwnership)) { projectileOwnership.Detonate(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)0; } } public class FireBloonTrap : AimThrowableBase { public static GameObject projectilePrefab; public static string soundString = "Play_engi_M2_throw"; public static GameObject muzzleEffectPrefab; private static GameObject INDICATOR = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/BasicThrowableVisualizer.prefab").WaitForCompletion(); private static float maxDistanceee = 8f; private float antiGravityCoefficient = 1f; public override void OnEnter() { base.arcVisualizerPrefab = INDICATOR; base.endpointVisualizerPrefab = ArrowRain.areaIndicatorPrefab; base.rayRadius = 0.5f; base.useGravity = true; base.endpointVisualizerRadiusScale = 0.5f; base.maxDistance = maxDistanceee; base.projectilePrefab = projectilePrefab; base.damageCoefficient = 0f; base.baseMinimumDuration = 0.15f; ((AimThrowableBase)this).OnEnter(); ((BaseState)this).StartAimMode(2f, false); } public override void UpdateTrajectoryInfo(out TrajectoryInfo dest) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: 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_0010: 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: 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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0190: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) dest = default(TrajectoryInfo); Ray aimRay = ((BaseState)this).GetAimRay(); RaycastHit val = default(RaycastHit); bool flag = false; if (base.rayRadius > 0f && Util.CharacterSpherecast(((EntityState)this).gameObject, aimRay, base.rayRadius, ref val, base.maxDistance, CommonMasks.bullet, (QueryTriggerInteraction)0) && Object.op_Implicit((Object)(object)((Component)((RaycastHit)(ref val)).collider).GetComponent())) { flag = true; } if (!flag) { flag = Util.CharacterRaycast(((EntityState)this).gameObject, aimRay, ref val, base.maxDistance, CommonMasks.bullet, (QueryTriggerInteraction)0); } if (flag) { dest.hitPoint = ((RaycastHit)(ref val)).point; dest.hitNormal = ((RaycastHit)(ref val)).normal; } else { dest.hitPoint = ((Ray)(ref aimRay)).GetPoint(base.maxDistance); dest.hitNormal = -((Ray)(ref aimRay)).direction; } Vector3 val2 = dest.hitPoint - ((Ray)(ref aimRay)).origin; if (base.useGravity) { float projectileBaseSpeed = base.projectileBaseSpeed; Vector2 val3 = default(Vector2); ((Vector2)(ref val3))..ctor(val2.x, val2.z); float magnitude = ((Vector2)(ref val3)).magnitude; float num = Trajectory.CalculateInitialYSpeed(magnitude / projectileBaseSpeed, val2.y, antiGravityCoefficient * Physics.gravity.y); Vector3 val4 = default(Vector3); ((Vector3)(ref val4))..ctor(val3.x / magnitude * projectileBaseSpeed, num, val3.y / magnitude * projectileBaseSpeed); dest.speedOverride = ((Vector3)(ref val4)).magnitude; dest.finalRay = new Ray(((Ray)(ref aimRay)).origin, val4 / dest.speedOverride); dest.travelTime = Trajectory.CalculateGroundTravelTime(projectileBaseSpeed, magnitude); } else { dest.speedOverride = base.projectileBaseSpeed; dest.finalRay = aimRay; dest.travelTime = base.projectileBaseSpeed / ((Vector3)(ref val2)).magnitude; } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class FireBuffTeleporter : AimThrowableBase { public static GameObject projectilePrefab; public static string soundString = "Play_engi_M2_throw"; public static GameObject muzzleEffectPrefab; private static GameObject INDICATOR = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/BasicThrowableVisualizer.prefab").WaitForCompletion(); private static float maxDistanceee = 15f; private float antiGravityCoefficient = 1f; public override void OnEnter() { base.arcVisualizerPrefab = INDICATOR; base.endpointVisualizerPrefab = ArrowRain.areaIndicatorPrefab; base.rayRadius = 0.5f; base.useGravity = true; base.endpointVisualizerRadiusScale = 0.5f; base.maxDistance = maxDistanceee; base.projectilePrefab = projectilePrefab; base.damageCoefficient = 0f; base.baseMinimumDuration = 0.15f; AntiGravityForce component = base.projectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { antiGravityCoefficient = component.antiGravityCoefficient; } ((AimThrowableBase)this).OnEnter(); ((BaseState)this).StartAimMode(2f, false); } public override void UpdateTrajectoryInfo(out TrajectoryInfo dest) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: 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_0010: 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: 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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0190: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) dest = default(TrajectoryInfo); Ray aimRay = ((BaseState)this).GetAimRay(); RaycastHit val = default(RaycastHit); bool flag = false; if (base.rayRadius > 0f && Util.CharacterSpherecast(((EntityState)this).gameObject, aimRay, base.rayRadius, ref val, base.maxDistance, CommonMasks.bullet, (QueryTriggerInteraction)0) && Object.op_Implicit((Object)(object)((Component)((RaycastHit)(ref val)).collider).GetComponent())) { flag = true; } if (!flag) { flag = Util.CharacterRaycast(((EntityState)this).gameObject, aimRay, ref val, base.maxDistance, CommonMasks.bullet, (QueryTriggerInteraction)0); } if (flag) { dest.hitPoint = ((RaycastHit)(ref val)).point; dest.hitNormal = ((RaycastHit)(ref val)).normal; } else { dest.hitPoint = ((Ray)(ref aimRay)).GetPoint(base.maxDistance); dest.hitNormal = -((Ray)(ref aimRay)).direction; } Vector3 val2 = dest.hitPoint - ((Ray)(ref aimRay)).origin; if (base.useGravity) { float projectileBaseSpeed = base.projectileBaseSpeed; Vector2 val3 = default(Vector2); ((Vector2)(ref val3))..ctor(val2.x, val2.z); float magnitude = ((Vector2)(ref val3)).magnitude; float num = Trajectory.CalculateInitialYSpeed(magnitude / projectileBaseSpeed, val2.y, antiGravityCoefficient * Physics.gravity.y); Vector3 val4 = default(Vector3); ((Vector3)(ref val4))..ctor(val3.x / magnitude * projectileBaseSpeed, num, val3.y / magnitude * projectileBaseSpeed); dest.speedOverride = ((Vector3)(ref val4)).magnitude; dest.finalRay = new Ray(((Ray)(ref aimRay)).origin, val4 / dest.speedOverride); dest.travelTime = Trajectory.CalculateGroundTravelTime(projectileBaseSpeed, magnitude); } else { dest.speedOverride = base.projectileBaseSpeed; dest.finalRay = aimRay; dest.travelTime = base.projectileBaseSpeed / ((Vector3)(ref val2)).magnitude; } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class FireMagnetBall : BaseSkillState { public static GameObject projectilePrefab; public static string soundString = "Play_captain_m2_tazer_shoot"; public static GameObject muzzleEffectPrefab; public static float bloom = 0.5f; public static float recoilAmplitude = 7f; public static float baseDuration = 1.5f; public static float earlyExitTime = 0.5f; public static float damageCoefficient = 6f; public static float force = 500f; public static float chargeTime = 0.33f; [NonSerialized] public static float selfKnockbackForce = 4400f; private float duration; private bool hasFired; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(2f, false); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration * chargeTime && !hasFired) { Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Fire() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: 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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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) hasFired = true; Util.PlaySound(soundString, ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, "CannonR", 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(); if (((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded) { ((EntityState)this).characterMotor.ApplyForce(((Ray)(ref aimRay)).direction * -1f * selfKnockbackForce, false, false); } FireProjectileInfo val = default(FireProjectileInfo); val.projectilePrefab = projectilePrefab; 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 = ((BaseState)this).RollCrit(); ProjectileManager.instance.FireProjectile(val); } } public override InterruptPriority GetMinimumInterruptPriority() { if (((EntityState)this).fixedAge >= duration * earlyExitTime) { return (InterruptPriority)0; } return (InterruptPriority)3; } } public class FireShockMine : BaseSkillState { public static GameObject projectilePrefab; public static string soundString = "Play_captain_m2_tazer_shoot"; public static GameObject muzzleEffectPrefab; public static float bloom = 2f; public static float recoilAmplitude = 0f; public static float baseDuration = 0.33f; public static float damageCoefficient = 1.2f; private float duration; public override void OnEnter() { //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: 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_010f: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(2f, false); Util.PlaySound(soundString, ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, "CannonR", 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(); if (((EntityState)this).isAuthority) { FireProjectileInfo val = default(FireProjectileInfo); val.projectilePrefab = projectilePrefab; 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 = 0f; val.crit = ((BaseState)this).RollCrit(); ProjectileManager.instance.FireProjectile(val); } } 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)2; } } public class LastPrism : BaseSkillState { public static float minDamageCoefficientPerSecond = 2f; public static float maxDamageCoefficientPerSecond = 10f; public static float procCoefficientPerSecond = 0.7f; public static float forcePerSecond = 500f; public static float baseTicksPerSecond = 6f; public static float baseMaxChargeTime = 2f; public static float baseMinimumDuration = 0.25f; public static float minRange = 8f; public static float maxRange = 50f; public static float bulletRadius = 1.5f; public static float maxTurnAnglePerSecond = 720f; public static float minTurnAnglePerSecond = 90f; public static GameObject beamEffectPrefab; public static float walkSpeedPenaltyCoefficient = 0.33f; public float recoilAmplitude; public float spreadBloomValuePerSecond = 3f; private float maxChargeTime; private float tickDamageStopwatch; private float minimumDuration; private Vector3 currentAimVector; private GameObject beamEffectInstance; private BeamFromPoints beamEffectComponent; private float turnSpeedAngle; private float range; public override void OnEnter() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_0062: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); minimumDuration = baseMinimumDuration / ((BaseState)this).attackSpeedStat; maxChargeTime = baseMaxChargeTime / ((BaseState)this).attackSpeedStat; currentAimVector = ((EntityState)this).inputBank.aimDirection; turnSpeedAngle = minTurnAnglePerSecond; range = minRange; beamEffectInstance = Object.Instantiate(beamEffectPrefab, ((EntityState)this).characterBody.corePosition, Quaternion.identity); beamEffectComponent = beamEffectInstance.GetComponent(); ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = walkSpeedPenaltyCoefficient; } public override void Update() { //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_0014: 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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).Update(); Vector3 aimDirection = ((EntityState)this).inputBank.aimDirection; currentAimVector = Vector3.RotateTowards(currentAimVector, aimDirection, MathF.PI / 180f * turnSpeedAngle * Time.deltaTime, 0f); if (Object.op_Implicit((Object)(object)beamEffectComponent)) { Vector3 position = currentAimVector * range + ((EntityState)this).transform.position; RaycastHit val = default(RaycastHit); if (Util.CharacterRaycast(((EntityState)this).gameObject, new Ray(((EntityState)this).inputBank.aimOrigin, currentAimVector), ref val, range, ((LayerIndex)(ref LayerIndex.world)).mask, (QueryTriggerInteraction)0)) { position = ((RaycastHit)(ref val)).point; } beamEffectComponent.startPoint.position = ((EntityState)this).characterBody.corePosition; beamEffectComponent.endPoint.position = position; } } public override void FixedUpdate() { //IL_00c0: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); float num = ((EntityState)this).fixedAge / maxChargeTime; float damageCoefficient = Mathf.Lerp(minDamageCoefficientPerSecond, maxDamageCoefficientPerSecond, num) * (1f / baseTicksPerSecond); turnSpeedAngle = Mathf.Lerp(maxTurnAnglePerSecond, minTurnAnglePerSecond * ((EntityState)this).characterBody.attackSpeed, num); range = Mathf.Lerp(minRange, maxRange, num); tickDamageStopwatch -= Time.fixedDeltaTime; ((EntityState)this).characterBody.AddSpreadBloom(spreadBloomValuePerSecond * (1f / baseTicksPerSecond)); if (tickDamageStopwatch <= 0f) { tickDamageStopwatch += 1f / baseTicksPerSecond; FireBullet(damageCoefficient, currentAimVector); } if (((((EntityState)this).fixedAge >= minimumDuration && !((BaseSkillState)this).IsKeyDownAuthority()) || ((EntityState)this).characterBody.isSprinting) && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)beamEffectInstance)) { EntityState.Destroy((Object)(object)beamEffectInstance); } ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = 1f; } private void FireBullet(float damageCoefficient, Vector3 direction) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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_00c3: 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) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); if (((EntityState)this).isAuthority) { new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = direction, muzzleName = "", maxDistance = range, minSpread = 0f, maxSpread = 0f, radius = bulletRadius, falloffModel = (FalloffModel)0, smartCollision = true, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask, hitMask = CommonMasks.bullet, damage = damageCoefficient * ((BaseState)this).damageStat, procCoefficient = procCoefficientPerSecond / baseTicksPerSecond, force = forcePerSecond / baseTicksPerSecond, isCrit = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), hitEffectPrefab = null }.Fire(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class RisingStar : BaseSkillState { private struct IndicatorInfo { public int refCount; public RisingStarIndicator indicator; } private class RisingStarIndicator : Indicator { public int missileCount; public override void UpdateVisualizer() { //IL_00ca: Unknown result type (might be due to invalid IL or missing references) ((Indicator)this).UpdateVisualizer(); Transform val = ((Indicator)this).visualizerTransform.Find("DotOrigin"); for (int num = val.childCount - 1; num >= missileCount; num--) { EntityState.Destroy((Object)(object)((Component)val.GetChild(num)).gameObject); } for (int i = val.childCount; i < missileCount; i++) { Object.Instantiate(((Component)((Indicator)this).visualizerPrefab.transform.Find("DotOrigin/DotTemplate")).gameObject, val); } if (val.childCount > 0) { float num2 = 360f / (float)val.childCount; float num3 = (float)(val.childCount - 1) * 90f; for (int j = 0; j < val.childCount; j++) { Transform child = val.GetChild(j); ((Component)child).gameObject.SetActive(true); child.localRotation = Quaternion.Euler(0f, 0f, num3 + (float)j * num2); } } } public RisingStarIndicator(GameObject owner, GameObject visualizerPrefab) : base(owner, visualizerPrefab) { } } public static float baseScanDuration = 0.3f; public static float baseScanInterval = 0.075f; public static float scanDistance = 128f; public static float scanAngle = 30f; public static float damageCoefficient = 3f; public static float procCoefficient = 1f; public static float baseFireDuration = 0.5f; public static float force = 150f; public static float recoil = 1f; public static float bloom = 0.4f; public static float bulletRadius = 0.4f; public static float bulletDistance = 150f; public static float blastRadius = 5f; public static int maxShots = 3; public static float walkSpeedPenaltyCoefficient = 0.33f; public static GameObject explosionEffectPrefab; public static GameObject tracerPrefab; public static GameObject hitEffectPrefab; public static GameObject muzzleFlashPrefab; public static string fireSoundString = "Play_lunar_golem_attack1_launch"; private HurtBox[] targets; private Dictionary targetIndicators; private int indicatorsAdded; private float scanInterval; private float scanStopwatch; private float scanDuration; private int shotsFired; private float fireInterval; private float fireStopwatch; private string muzzleString = "CannonR"; public override void OnEnter() { ((BaseState)this).OnEnter(); scanDuration = baseScanDuration / ((BaseState)this).attackSpeedStat; scanInterval = baseScanInterval / ((BaseState)this).attackSpeedStat; targets = GetTargets(); targetIndicators = new Dictionary(); fireInterval = baseFireDuration / (float)maxShots / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = walkSpeedPenaltyCoefficient; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= scanDuration) { fireStopwatch -= Time.fixedDeltaTime; if (fireStopwatch <= 0f) { fireStopwatch += fireInterval; if (targets.Length != 0) { int num = targets.Length; int num2 = shotsFired % num; FireAt(targets[num2]); } else { FireAt(null); } } } else if (((EntityState)this).isAuthority && targets.Length != 0) { CleanTargetsList(); scanStopwatch -= Time.fixedDeltaTime; if (scanStopwatch <= 0f && indicatorsAdded < maxShots) { scanStopwatch += scanInterval; AddIndicator(targets[indicatorsAdded]); indicatorsAdded++; } } if (shotsFired >= maxShots) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = 1f; if (targetIndicators == null) { return; } foreach (KeyValuePair targetIndicator in targetIndicators) { ((Indicator)targetIndicator.Value.indicator).active = false; } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } public void CleanTargetsList() { for (int num = targets.Length - 1; num >= 0; num--) { HurtBox val = targets[num]; if ((!Object.op_Implicit((Object)(object)val.healthComponent) || !val.healthComponent.alive) && targetIndicators.TryGetValue(val, out var value)) { ((Indicator)value.indicator).active = false; targetIndicators.Remove(val); } } } private void FireAt(HurtBox hurtBox) { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0097: 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_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_00ab: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_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_0113: 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_012b: Expected O, but got Unknown //IL_012b: 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_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Expected O, but got Unknown //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: 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_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: 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_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) shotsFired++; EffectManager.SimpleMuzzleFlash(muzzleFlashPrefab, ((EntityState)this).gameObject, muzzleString, false); ((EntityState)this).characterBody.AddSpreadBloom(bloom); ((BaseState)this).AddRecoil(-1f * recoil, -1.5f * recoil, -1f * recoil, 1f * recoil); Util.PlaySound(fireSoundString, ((EntityState)this).gameObject); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val; if (!((Object)(object)hurtBox != (Object)null)) { val = ((Ray)(ref aimRay)).direction; } else { Vector3 val2 = ((Component)hurtBox).transform.position - ((Ray)(ref aimRay)).origin; val = ((Vector3)(ref val2)).normalized; } Vector3 val3 = val; if (((EntityState)this).isAuthority) { RaycastHit val4 = default(RaycastHit); Vector3 val5 = (Physics.SphereCast(((Ray)(ref aimRay)).origin, bulletRadius, val3, ref val4, bulletDistance, ((LayerMask)(ref CommonMasks.bullet)).value, (QueryTriggerInteraction)0) ? ((RaycastHit)(ref val4)).point : ((Ray)(ref aimRay)).GetPoint(bulletDistance)); if (Object.op_Implicit((Object)(object)hurtBox)) { RemoveIndicator(hurtBox); } EffectManager.SpawnEffect(explosionEffectPrefab, new EffectData { origin = val5, scale = blastRadius }, true); EffectData val6 = new EffectData { origin = val5, start = ((Ray)(ref aimRay)).origin }; int num = ((EntityState)this).GetModelChildLocator().FindChildIndex("CannonR"); val6.SetChildLocatorTransformReference(((EntityState)this).gameObject, num); EffectManager.SpawnEffect(tracerPrefab, val6, true); new BlastAttack { attacker = ((EntityState)this).gameObject, attackerFiltering = (AttackerFiltering)0, position = val5, teamIndex = ((EntityState)this).teamComponent.teamIndex, radius = blastRadius, baseDamage = ((BaseState)this).damageStat * damageCoefficient, damageType = (DamageType)32, crit = ((BaseState)this).RollCrit(), procCoefficient = procCoefficient, procChainMask = default(ProcChainMask), baseForce = force, damageColorIndex = (DamageColorIndex)0, falloffModel = (FalloffModel)1, losType = (LoSType)0 }.Fire(); } } private void AddIndicator(HurtBox hurtBox) { Util.PlaySound(Paint.lockOnSoundString, ((EntityState)this).gameObject); if (!targetIndicators.TryGetValue(hurtBox, out var value)) { IndicatorInfo indicatorInfo = default(IndicatorInfo); indicatorInfo.refCount = 0; indicatorInfo.indicator = new RisingStarIndicator(((EntityState)this).gameObject, Resources.Load("Prefabs/EngiMissileTrackingIndicator")); value = indicatorInfo; ((Indicator)value.indicator).targetTransform = ((Component)hurtBox).transform; ((Indicator)value.indicator).active = true; } value.refCount++; value.indicator.missileCount = value.refCount; targetIndicators[hurtBox] = value; } public void RemoveIndicator(HurtBox hurtBox) { if (targetIndicators.TryGetValue(hurtBox, out var value)) { value.refCount--; value.indicator.missileCount = value.refCount; targetIndicators[hurtBox] = value; if (value.refCount == 0) { ((Indicator)value.indicator).active = false; targetIndicators.Remove(hurtBox); } } } private HurtBox[] GetTargets() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); TeamMask allButNeutral = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral)).RemoveTeam(((EntityState)this).teamComponent.teamIndex); BullseyeSearch val = new BullseyeSearch { teamMaskFilter = allButNeutral, filterByLoS = true, searchOrigin = ((Ray)(ref aimRay)).origin, searchDirection = ((Ray)(ref aimRay)).direction, sortMode = (SortMode)2, maxDistanceFilter = scanDistance, maxAngleFilter = scanAngle }; val.RefreshCandidates(); val.FilterOutGameObject(((EntityState)this).gameObject); HurtBox[] array = val.GetResults().ToArray(); if (array.Length == 0) { return Array.Empty(); } HurtBox[] array2 = (HurtBox[])(object)new HurtBox[maxShots]; for (int i = 0; i < array2.Length; i++) { int num = i % array.Length; array2[i] = array[num]; } return array2; } } public class Teleport : BaseSkillState { public class CameraMover : MonoBehaviour, ICameraStateProvider { public static float endLerpTime = 0.2f; public float lerpTime; public Vector3 position; private void OnEnable() { foreach (CameraRigController readOnlyInstances in CameraRigController.readOnlyInstancesList) { if ((Object)(object)readOnlyInstances.target == (Object)(object)((Component)this).gameObject) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)(object)this, lerpTime); } else if (readOnlyInstances.IsOverrideCam((ICameraStateProvider)(object)this)) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)null, 0.05f); } } } private void OnDisable() { foreach (CameraRigController readOnlyInstances in CameraRigController.readOnlyInstancesList) { if ((Object)(object)readOnlyInstances.target == (Object)(object)((Component)this).gameObject) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)null, endLerpTime); } else if (readOnlyInstances.IsOverrideCam((ICameraStateProvider)(object)this)) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)null, 0.05f); } } } public void GetCameraState(CameraRigController cameraRigController, ref CameraState cameraState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_0085: 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_0088: Unknown result type (might be due to invalid IL or missing references) Vector3 val = position; Vector3 value = cameraRigController.targetParams.currentCameraParamsData.idealLocalCameraPos.value; value.y += cameraRigController.targetParams.currentCameraParamsData.pivotVerticalOffset.value + 0.9f; value += (Object.op_Implicit((Object)(object)cameraRigController.targetParams.cameraPivotTransform) ? cameraRigController.targetParams.cameraPivotTransform.localPosition : Vector3.zero); val += cameraState.rotation * value; cameraState.position = val; } public bool IsHudAllowed(CameraRigController cameraRigController) { return true; } public bool IsUserControlAllowed(CameraRigController cameraRigController) { return true; } public bool IsUserLookAllowed(CameraRigController cameraRigController) { return true; } } public static float exitHopVelocity = 12f; public static float baseDuration = 0.33f; private float duration; private CameraMover camera; private TeleporterProjectile.ProjectileTeleporterOwnership teleporterOwnership; private Vector3 teleportTarget; public static float exitVelocityCoefficient = 400f; private Vector3 storedVelocity; public override void OnEnter() { //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_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); teleporterOwnership = ((EntityState)this).GetComponent(); if (!Object.op_Implicit((Object)(object)teleporterOwnership)) { Debug.LogError((object)"Cyborg2 teleport failed! No teleporter component. (howw?????)"); ((EntityState)this).outer.SetNextStateToMain(); return; } teleportTarget = teleporterOwnership.teleporter.GetSafeTeleportPosition(); duration = baseDuration; camera = ((EntityState)this).gameObject.AddComponent(); camera.lerpTime = duration; camera.position = teleportTarget; storedVelocity = ((EntityState)this).characterMotor.velocity; if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } } private void UpdateTarget() { //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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)teleporterOwnership) && Object.op_Implicit((Object)(object)teleporterOwnership.teleporter)) { teleportTarget = teleporterOwnership.teleporter.GetSafeTeleportPosition(); if (Object.op_Implicit((Object)(object)camera)) { camera.position = teleportTarget; } } } public override void FixedUpdate() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: 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_00bd: 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_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); UpdateTarget(); ((EntityState)this).characterMotor.velocity = Vector3.zero; if (!((EntityState)this).isAuthority || !(((EntityState)this).fixedAge >= duration)) { return; } if (teleportTarget != Vector3.zero) { TeleportHelper.TeleportBody(((EntityState)this).characterBody, teleportTarget); CharacterDirection characterDirection = ((EntityState)this).characterDirection; Ray aimRay = ((BaseState)this).GetAimRay(); characterDirection.forward = ((Ray)(ref aimRay)).direction; Vector3 val = Vector3.zero; if (Object.op_Implicit((Object)(object)teleporterOwnership) && Object.op_Implicit((Object)(object)teleporterOwnership.teleporter)) { val = ((Component)teleporterOwnership.teleporter).GetComponent().velocity; } val *= exitVelocityCoefficient; ((EntityState)this).characterMotor.ApplyForce(val, false, false); ((BaseState)this).SmallHop(((EntityState)this).characterMotor, exitHopVelocity); } ((EntityState)this).outer.SetNextStateToMain(); } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)teleporterOwnership)) { teleporterOwnership.DoTeleport(); } if (Object.op_Implicit((Object)(object)camera)) { EntityState.Destroy((Object)(object)camera); } if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class Unmaker : BaseSkillState, IStepSetter { public static float baseDuration = 0.45f; public static float bulletMaxDistance = 256f; public static float bulletRadius = 1f; public static float damageCoefficient = 2.5f; public static float procCoefficient = 1f; public static float force = 150f; public static GameObject tracerPrefab; public static GameObject hitEffectPrefab; public static GameObject muzzleFlashPrefab; public static string fireSoundString = "Play_MULT_m1_snipe_shoot"; public static float recoil = 1f; public static float bloom = 0.4f; public static float fireSoundPitch = 1f; private float duration; private bool hasFired; private string muzzleString; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(2f, false); Fire(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { if (!((EntityState)this).outer.destroying && !hasFired) { Fire(); } ((EntityState)this).OnExit(); } private void Fire() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: 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_00c5: 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_00ce: 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_00e5: 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_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) EffectManager.SimpleMuzzleFlash(muzzleFlashPrefab, ((EntityState)this).gameObject, muzzleString, false); ((EntityState)this).characterBody.AddSpreadBloom(bloom); ((BaseState)this).AddRecoil(-1f * recoil, -1.5f * recoil, -1f * recoil, 1f * recoil); hasFired = true; Util.PlayAttackSpeedSound(fireSoundString, ((EntityState)this).gameObject, fireSoundPitch); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); new BulletAttack { aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, owner = ((EntityState)this).gameObject, damage = ((BaseState)this).damageStat * damageCoefficient, damageColorIndex = (DamageColorIndex)0, damageType = (DamageType)0, falloffModel = (FalloffModel)1, force = force, HitEffectNormal = false, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, maxDistance = bulletMaxDistance, radius = bulletRadius, isCrit = ((BaseState)this).RollCrit(), muzzleName = muzzleString, minSpread = 0f, maxSpread = 0f, hitEffectPrefab = hitEffectPrefab, smartCollision = true, tracerEffectPrefab = tracerPrefab }.Fire(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } public void SetStep(int i) { muzzleString = ((i == 0) ? "CannonR" : "CannonL"); } } } namespace EntityStates.Cyborg2.ShockMine { public class BaseShockMineState : BaseState { private protected ProjectileStickOnImpact projectileStickOnImpact; private protected ProjectileTargetComponent projectileTargetComponent; protected virtual bool shouldStick => false; public override void OnEnter() { ((BaseState)this).OnEnter(); projectileTargetComponent = ((EntityState)this).GetComponent(); projectileStickOnImpact = ((EntityState)this).GetComponent(); if (((Behaviour)projectileStickOnImpact).enabled != shouldStick) { ((Behaviour)projectileStickOnImpact).enabled = shouldStick; } } } public class Burrow : BaseShockMineState { public static float baseDuration = 0.25f; private float duration; protected override bool shouldStick => true; public override void OnEnter() { base.OnEnter(); duration = baseDuration; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { EntityState val = null; if (!projectileStickOnImpact.stuck) { val = (EntityState)(object)new WaitForStick(); } else if (duration <= ((EntityState)this).fixedAge) { val = (EntityState)(object)new WaitForTarget(); } if (val != null) { ((EntityState)this).outer.SetNextState(val); } } } } public class Expire : BaseShockMineState { public static GameObject expireEffectPrefab; protected override bool shouldStick => false; public override void OnEnter() { //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_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown base.OnEnter(); if (NetworkServer.active && Object.op_Implicit((Object)(object)expireEffectPrefab)) { EffectManager.SpawnEffect(expireEffectPrefab, new EffectData { origin = ((EntityState)this).transform.position }, true); } EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } public class ShockNearby : BaseShockMineState { public static int numShocks = 4; public static float baseDuration = 4f; public static float blastRadius = 10f; public static GameObject shockEffectPrefab = SS2Assets.LoadAsset("Cyborg2ShockNova", SS2Bundle.Indev); private ProjectileDamage projectileDamage; private float shockInterval; private float shockTimer; private int timesShocked; protected override bool shouldStick => false; public override void OnEnter() { base.OnEnter(); projectileDamage = ((EntityState)this).GetComponent(); shockInterval = (float)numShocks / baseDuration; } public override void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).rigidbody.velocity = Vector3.zero; shockTimer -= Time.fixedDeltaTime; if (shockTimer <= 0f) { shockTimer += shockInterval; Shock(); timesShocked++; } if (timesShocked >= numShocks) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Expire()); } } private void Shock() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: 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) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_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_0025: 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_0040: Expected O, but got Unknown //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: 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_0138: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { if (Object.op_Implicit((Object)(object)shockEffectPrefab)) { EffectManager.SpawnEffect(shockEffectPrefab, new EffectData { origin = ((EntityState)this).transform.position, scale = blastRadius }, true); } new BlastAttack { position = ((EntityState)this).transform.position, baseDamage = projectileDamage.damage, baseForce = 0f, radius = blastRadius, attacker = (Object.op_Implicit((Object)(object)((EntityState)this).projectileController.owner) ? ((EntityState)this).projectileController.owner.gameObject : null), inflictor = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).projectileController.teamFilter.teamIndex, crit = projectileDamage.crit, procChainMask = ((EntityState)this).projectileController.procChainMask, procCoefficient = ((EntityState)this).projectileController.procCoefficient, bonusForce = Vector3.zero, falloffModel = (FalloffModel)0, damageColorIndex = projectileDamage.damageColorIndex, damageType = projectileDamage.damageType, attackerFiltering = (AttackerFiltering)0 }.Fire(); } } } public class Unburrow : BaseShockMineState { public static float baseDuration = 0.67f; public static float hopVelocity = 20f; private float duration; protected override bool shouldStick => false; public override void OnEnter() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); duration = baseDuration; Vector3 velocity = Vector3.up * hopVelocity; ((EntityState)this).rigidbody.velocity = velocity; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ShockNearby()); } } } public class WaitForStick : BaseShockMineState { protected override bool shouldStick => true; public override void OnEnter() { base.OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && projectileStickOnImpact.stuck) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Burrow()); } } } public class WaitForTarget : BaseShockMineState { private protected ProjectileSphereTargetFinder targetFinder; protected override bool shouldStick => true; public override void OnEnter() { base.OnEnter(); if (NetworkServer.active) { targetFinder = ((EntityState)this).GetComponent(); ((Behaviour)targetFinder).enabled = true; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { EntityState val = null; if (!projectileStickOnImpact.stuck) { val = (EntityState)(object)new WaitForStick(); } else if (Object.op_Implicit((Object)(object)projectileTargetComponent.target)) { val = (EntityState)(object)new Unburrow(); } if (val != null) { ((EntityState)this).outer.SetNextState(val); } } } public override void OnExit() { if (Object.op_Implicit((Object)(object)targetFinder)) { ((Behaviour)targetFinder).enabled = false; } ((EntityState)this).OnExit(); } } } namespace EntityStates.Cyborg2.BloonTrap { public class BaseBloonTrapState : BaseState { private protected ProjectileStickOnImpact projectileStickOnImpact; private protected ProjectileTargetComponent projectileTargetComponent; private protected Moonstorm.Starstorm2.Components.BloonTrap bloonTrap; protected virtual bool shouldStick => false; public override void OnEnter() { ((BaseState)this).OnEnter(); projectileStickOnImpact = ((EntityState)this).GetComponent(); bloonTrap = ((EntityState)this).GetComponent(); if (((Behaviour)projectileStickOnImpact).enabled != shouldStick) { ((Behaviour)projectileStickOnImpact).enabled = shouldStick; } } } } namespace EntityStates.Borg { public class BorgMain : GenericCharacterMain { private float hoverVelocity = -1.1f; private float hoverAcceleration = 25f; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); } public override void OnExit() { ((GenericCharacterMain)this).OnExit(); } public override void ProcessJump() { //IL_00bd: 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) ((GenericCharacterMain)this).ProcessJump(); if (((BaseCharacterMain)this).hasCharacterMotor && ((BaseCharacterMain)this).hasInputBank && ((EntityState)this).isAuthority) { bool flag = ((EntityState)this).inputBank.jump.down && ((EntityState)this).characterMotor.velocity.y < 0f && !((EntityState)this).characterMotor.isGrounded; if (((EntityState)this).isAuthority && flag) { 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); } } } public override void FixedUpdate() { ((GenericCharacterMain)this).FixedUpdate(); } } public class BorgFireBaseShot : BaseSkillState { private enum BorgMuzzle { MuzzleLeft, MuzzleRight, MuzzleEye } public static float damageCoefficient = 2.5f; public float baseDuration = 0.5f; public float recoil = 1f; public static int CurrentMuzzleIndex = 0; [HideInInspector] public static GameObject tracerEffectPrefab = Resources.Load("Prefabs/Effects/Tracers/TracerHuntressSnipe"); [HideInInspector] public GameObject effectPrefab = Resources.Load("prefabs/effects/impacteffects/HitsparkCommandoShotgun"); [HideInInspector] public GameObject critEffectPrefab = Resources.Load("prefabs/effects/impacteffects/critspark"); private float duration; private float fireDuration; private bool hasFired; private Animator animator; private string muzzleString; private BorgMuzzle borgMuzzle; public override void OnEnter() { borgMuzzle = (BorgMuzzle)CurrentMuzzleIndex; ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireDuration = 0.25f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); switch (borgMuzzle) { case BorgMuzzle.MuzzleEye: muzzleString = "MuzzleEye"; break; case BorgMuzzle.MuzzleLeft: muzzleString = "MuzzleLeft"; ((EntityState)this).PlayAnimation("Gesture, Override", "FireM1", "FireM1.playbackRate", duration); break; case BorgMuzzle.MuzzleRight: muzzleString = "MuzzleRight"; ((EntityState)this).PlayAnimation("Gesture, Override", "FireM1Alt", "FireM1.playbackRate", duration); break; } SwitchMuzzle(); } private void SwitchMuzzle() { if (borgMuzzle == BorgMuzzle.MuzzleLeft) { CurrentMuzzleIndex = 1; } else if (borgMuzzle == BorgMuzzle.MuzzleRight) { CurrentMuzzleIndex = 2; } else if (borgMuzzle == BorgMuzzle.MuzzleEye) { CurrentMuzzleIndex = 0; } } public override void OnExit() { ((EntityState)this).OnExit(); } private void FireShot() { //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_0045: 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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; ((EntityState)this).characterBody.AddSpreadBloom(0.35f); Ray aimRay = ((BaseState)this).GetAimRay(); Util.PlaySound("BorgPrimary", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0f, maxSpread = 0f, damage = damageCoefficient * ((BaseState)this).damageStat, force = 100f, radius = 0.35f, tracerEffectPrefab = tracerEffectPrefab, muzzleName = muzzleString, hitEffectPrefab = (Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master) ? critEffectPrefab : effectPrefab), isCrit = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master) }.Fire(); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireDuration) { FireShot(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class BorgFireTrackshot : BaseSkillState { public static float damageCoefficient = 3f; public float baseDuration = 0.4f; public float recoil = 1f; [HideInInspector] public static GameObject tracerEffectPrefab = Resources.Load("Prefabs/Effects/Tracers/TracerHuntressSnipe"); [HideInInspector] public GameObject effectPrefab = Resources.Load("prefabs/effects/impacteffects/HitsparkCommandoShotgun"); [HideInInspector] public GameObject critEffectPrefab = Resources.Load("prefabs/effects/impacteffects/critspark"); private float duration; private float fireDuration; private bool firstShot; private bool secondShot; private bool thirdShot; private Animator animator; private string muzzleString; private BullseyeSearch search = new BullseyeSearch(); public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireDuration = 0.25f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); muzzleString = "Lowerarm.L_end"; ((EntityState)this).PlayAnimation("Gesture, Override", "FireM2", "FireArrow.playbackRate", duration); } public override void OnExit() { ((EntityState)this).OnExit(); } private void FireTrackshot() { //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_0017: 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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_0044: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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_006c: 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_0082: 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) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: 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_0101: 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_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0124: 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_0141: 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_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0184: 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_01a3: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).characterBody.AddSpreadBloom(0.75f); Ray aimRay = ((BaseState)this).GetAimRay(); BullseyeSearch val = new BullseyeSearch(); TeamComponent component = ((Component)((EntityState)this).characterBody).GetComponent(); val.teamMaskFilter = TeamMask.all; ((TeamMask)(ref val.teamMaskFilter)).RemoveTeam(component.teamIndex); val.filterByLoS = true; val.searchOrigin = ((Ray)(ref aimRay)).origin; val.searchDirection = ((Ray)(ref aimRay)).direction; val.sortMode = (SortMode)2; val.maxDistanceFilter = 10000f; val.maxAngleFilter = 30f; val.RefreshCandidates(); Vector3 val2 = ((Ray)(ref aimRay)).direction; HurtBox val3 = val.GetResults().FirstOrDefault(); if (Object.op_Implicit((Object)(object)val3)) { val2 = ((Component)val3).transform.position - ((Ray)(ref aimRay)).origin; } Util.PlaySound("BorgSecondary", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Vector3)(ref val2)).normalized, minSpread = 0f, maxSpread = 0f, damage = damageCoefficient * ((BaseState)this).damageStat, force = 100f, tracerEffectPrefab = tracerEffectPrefab, muzzleName = muzzleString, hitEffectPrefab = (Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master) ? critEffectPrefab : effectPrefab), isCrit = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), damageType = (DamageType)32 }.Fire(); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireDuration && !firstShot) { FireTrackshot(); firstShot = true; } if (((EntityState)this).fixedAge >= fireDuration * 2f && !secondShot) { FireTrackshot(); secondShot = true; } if (((EntityState)this).fixedAge >= fireDuration * 3f && !thirdShot) { FireTrackshot(); thirdShot = true; } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } } namespace EntityStates.Chirr { public class AimDrop : BaseSkillState { public static float splashRadius = 10f; public static float damageCoefficient = 15f; public static float dropMaxHorizontalVelocity = 20f; public static float minimumThrowDistance = 20f; public static float dropConeAngle = 55f; public static float maxRayDistance = 50f; public static float extraGravity = -15f; public static float selfAwayForce = 10f; public static float selfUpForce = 10f; private GameObject areaIndicatorInstance; private GrabController grabController; private ChirrGrabBehavior chirrGrabBehavior; private Vector3 desiredTrajectory; public override void OnEnter() { //IL_0060: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((BaseState)this).StartAimMode(2f, false); grabController = ((EntityState)this).GetComponent(); chirrGrabBehavior = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)ArrowRain.areaIndicatorPrefab)) { areaIndicatorInstance = Object.Instantiate(ArrowRain.areaIndicatorPrefab); areaIndicatorInstance.transform.localScale = new Vector3(ArrowRain.arrowRainRadius, ArrowRain.arrowRainRadius, ArrowRain.arrowRainRadius); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority()) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void Update() { ((EntityState)this).Update(); CalculateTrajectory(); } private void CalculateTrajectory() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //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_0017: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0045: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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_00ab: 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_00c3: 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) Vector3 down = Vector3.down; Vector3 aimOrigin = ((EntityState)this).inputBank.aimOrigin; Vector3 val = Vector3.RotateTowards(down, ((EntityState)this).inputBank.aimDirection, MathF.PI / 180f * dropConeAngle, 0f); Vector3 val2 = val * maxRayDistance + aimOrigin; RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(aimOrigin, val, ref val3, maxRayDistance, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { val2 = ((RaycastHit)(ref val3)).point; } if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { areaIndicatorInstance.transform.position = val2; areaIndicatorInstance.transform.up = val2; } float num = Trajectory.CalculateFlightDuration(aimOrigin.y, val2.y, 0f, Physics.gravity.y + extraGravity); Vector3 val4 = val2 - aimOrigin; val4.y = 0f; float num2 = ((Vector3)(ref val4)).magnitude / num; desiredTrajectory = num2 * ((Vector3)(ref val4)).normalized; } public override void OnExit() { //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_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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); if (((EntityState)this).isAuthority) { Vector3 val = -1f * ((EntityState)this).inputBank.aimDirection * selfAwayForce; val += Vector3.up * selfUpForce; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((BaseState)this).isGrounded) { float num = Mathf.Max(((EntityState)this).characterMotor.velocity.y, val.y); ((EntityState)this).characterMotor.velocity = new Vector3(((EntityState)this).characterMotor.velocity.x + val.x, num, ((EntityState)this).characterMotor.velocity.z + val.z); EntityStateMachine obj = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Wings"); if (((obj != null) ? ((object)obj.state).GetType() : null) != typeof(Idle)) { ((EntityState)this).characterBody.isSprinting = true; } } } if (!((EntityState)this).outer.destroying && Object.op_Implicit((Object)(object)grabController) && grabController.IsGrabbing()) { Util.PlaySound("ChirrGrabThrow", ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("FullBody, Override", "GrabThrow"); ((BaseState)this).StartAimMode(2f, false); bool friendly = grabController.victimInfo.body.teamComponent.teamIndex == ((EntityState)this).teamComponent.teamIndex; if (NetworkServer.active && Object.op_Implicit((Object)(object)chirrGrabBehavior)) { GameObject victimBodyObject = grabController.victimBodyObject; grabController.AttemptGrab(null); chirrGrabBehavior.ThrowVictim(victimBodyObject, desiredTrajectory, extraGravity, friendly); } } else { SS2Log.Warning("Chirr.AimDrop: didn't see victim! This is fine if you are a client. IsGrabbing = " + grabController.IsGrabbing()); } if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { EntityState.Destroy((Object)(object)areaIndicatorInstance.gameObject); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class Befriend : BaseSkillState { public string soundString; public GameObject muzzleEffectPrefab; public static float baseDuration = 0.5f; public static float fireTime = 0f; public static float bloom = 1f; public static float recoilAmplitude = 0.1f; public static float damageCoefficient; public static float procCoefficient; public static float force; private bool hasFired; private float duration; private ChirrFriendTracker tracker; private HurtBox target; [NonSerialized] private static bool additivetest = false; [NonSerialized] private static bool fullbodytest = true; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; tracker = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)tracker) && ((EntityState)this).isAuthority) { target = tracker.GetTrackingTarget(); } ((BaseState)this).StartAimMode(2f, false); Util.PlaySound("ChirrFireSpecial", ((EntityState)this).gameObject); string text = (fullbodytest ? "FullBody, " : "Gesture, "); text += (additivetest ? "Additive" : "Override"); ((EntityState)this).PlayAnimation(text, "FireSpecial", "Special.playbackRate", duration); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!hasFired && ((EntityState)this).fixedAge >= fireTime * duration) { Fire(); hasFired = true; } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Fire() { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).AddRecoil(-1f * recoilAmplitude, -1.5f * recoilAmplitude, -0.25f * recoilAmplitude, 0.25f * recoilAmplitude); ((EntityState)this).characterBody.AddSpreadBloom(bloom); Transform val = ((BaseState)this).FindModelChild("Mouth"); if (NetworkServer.active) { OrbManager.instance.AddOrb((Orb)(object)new ChirrFriendOrb { attacker = ((EntityState)this).gameObject, target = target, tracker = tracker, origin = (Object.op_Implicit((Object)(object)val) ? val.position : ((EntityState)this).characterBody.corePosition), damageType = (DamageType)32, procCoefficient = 0f }); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } public override void OnSerialize(NetworkWriter writer) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) NetworkExtensions.Write(writer, HurtBoxReference.FromHurtBox(target)); } public override void OnDeserialize(NetworkReader reader) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) HurtBoxReference val = NetworkExtensions.ReadHurtBoxReference(reader); target = ((HurtBoxReference)(ref val)).ResolveHurtBox(); } } public class BugCharacterMain : GenericCharacterMain { private EntityStateMachine wingsStateMachine; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); wingsStateMachine = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Wings"); } public override void ProcessJump() { ((GenericCharacterMain)this).ProcessJump(); if (((BaseCharacterMain)this).hasCharacterMotor && ((BaseCharacterMain)this).hasInputBank && ((EntityState)this).isAuthority) { bool num = ((EntityState)this).inputBank.jump.down && ((EntityState)this).characterMotor.velocity.y < 0f && !((EntityState)this).characterMotor.isGrounded; bool flag = !wingsStateMachine.IsInMainState(); if (num && !flag) { wingsStateMachine.SetNextState((EntityState)(object)new WingsOn()); } } } public override void HandleMovements() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: 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_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).HandleMovements(); if (!wingsStateMachine.IsInMainState()) { Vector3 val = ((base.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : base.moveVector); Vector3.Angle(base.aimDirection, val); Mathf.Max(base.aimAnimator.pitchRangeMax + base.aimAnimator.pitchGiveupRange, base.aimAnimator.yawRangeMax + base.aimAnimator.yawGiveupRange); bool flag = ((EntityState)this).characterBody.aimTimer > 0f; ((EntityState)this).characterDirection.moveVector = ((Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && flag) ? base.aimDirection : val); } } public override void OnExit() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown ((GenericCharacterMain)this).OnExit(); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)wingsStateMachine)) { wingsStateMachine.SetNextState((EntityState)new Idle()); } ((GenericCharacterMain)this).OnExit(); } } public class DroppedState : BaseState { public class DetonateOnImpact : MonoBehaviour { public DroppedState droppedState; private void OnCollisionEnter(Collision collision) { if (collision.gameObject.layer == LayerIndex.world.intVal || collision.gameObject.layer == LayerIndex.entityPrecise.intVal) { droppedState.detonateNextFrame = true; Object.Destroy((Object)(object)this); } } } public static float bounceForce = 2000f; public static float force = 800f; public static float blastRadius = 10f; public static float procCoefficient = 1f; public static float damageCoefficient = 15f; public static float absoluteMaxTime = 8f; public GameObject inflictor; public Vector3 initialVelocity; public static GameObject hitGroundEffect = Addressables.LoadAssetAsync((object)"RoR2/Base/Beetle/BeetleGuardGroundSlam.prefab").WaitForCompletion(); public float extraGravity; public bool friendlyDrop; public bool detonateNextFrame; private DetonateOnImpact detonateOnImpact; private bool bodyHadGravity = true; private bool bodyWasKinematic = true; private bool bodyCouldTakeImpactDamage = true; private CharacterGravityParameters gravParams; private Rigidbody tempRigidbody; private SphereCollider tempSphereCollider; public override void OnEnter() { //IL_00a0: 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_002e: 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_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0122: 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_0134: 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_01a4: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && NetworkServer.active) { CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); } if (Object.op_Implicit((Object)(object)modelAnimator)) { if (!friendlyDrop) { modelAnimator.GetLayerIndex("Body"); ((Behaviour)modelAnimator).enabled = false; modelAnimator.CrossFadeInFixedTime((Random.Range(0, 2) == 0) ? "Hurt1" : "Hurt2", 0.1f); modelAnimator.Update(0f); } else { AimAnimator aimAnimator = ((EntityState)this).GetAimAnimator(); if (Object.op_Implicit((Object)(object)aimAnimator)) { ((Behaviour)aimAnimator).enabled = true; } } } GameObject bodyPrefab = BodyCatalog.GetBodyPrefab(((EntityState)this).characterBody.bodyIndex); if (Object.op_Implicit((Object)(object)bodyPrefab)) { Rigidbody component = bodyPrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { bodyHadGravity = component.useGravity; bodyWasKinematic = component.isKinematic; } } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.onMovementHit += new MovementHitDelegate(DoSplashDamage); ((EntityState)this).characterMotor.disableAirControlUntilCollision = true; ((EntityState)this).characterMotor.velocity = initialVelocity; gravParams = ((EntityState)this).characterMotor.gravityParameters; ((EntityState)this).characterMotor.gravityParameters = new CharacterGravityParameters { environmentalAntiGravityGranterCount = 0, antiGravityNeutralizerCount = 0, channeledAntiGravityGranterCount = 0 }; } else { Rigidbody val = ((EntityState)this).rigidbody; if (!Object.op_Implicit((Object)(object)val)) { val = ((EntityState)this).gameObject.AddComponent(); val.mass = 100f; tempRigidbody = val; tempSphereCollider = ((EntityState)this).gameObject.AddComponent(); } val.velocity = initialVelocity; val.useGravity = true; detonateOnImpact = ((EntityState)this).gameObject.AddComponent(); detonateOnImpact.droppedState = this; if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbodyMotor)) { bodyCouldTakeImpactDamage = ((EntityState)this).rigidbodyMotor.canTakeImpactDamage; ((EntityState)this).rigidbodyMotor.canTakeImpactDamage = false; ((Behaviour)((EntityState)this).rigidbodyMotor).enabled = false; } } if (((EntityState)this).isAuthority) { inflictor.GetComponent().onVictimReleased += ReleaseLatencyFixTEMP; } } private void ReleaseLatencyFixTEMP(PassengerInfo _) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) SS2Log.Warning("ReleaseLatencyFixTEMP: Setting velocity to " + initialVelocity); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = initialVelocity; } else if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbody)) { ((EntityState)this).rigidbody.velocity = initialVelocity; } } private void DoSplashDamage(ref MovementHitInfo movementHitInfo) { detonateNextFrame = true; } public override void OnExit() { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_004f: 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_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { inflictor.GetComponent().onVictimReleased -= ReleaseLatencyFixTEMP; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.onMovementHit -= new MovementHitDelegate(DoSplashDamage); ((EntityState)this).characterMotor.gravityParameters = gravParams; } if (Object.op_Implicit((Object)(object)detonateOnImpact)) { EntityState.Destroy((Object)(object)detonateOnImpact); } if (Object.op_Implicit((Object)(object)tempRigidbody)) { EntityState.Destroy((Object)(object)tempRigidbody); } if (Object.op_Implicit((Object)(object)tempSphereCollider)) { EntityState.Destroy((Object)(object)tempSphereCollider); } if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbodyMotor)) { ((EntityState)this).rigidbodyMotor.canTakeImpactDamage = bodyCouldTakeImpactDamage; ((Behaviour)((EntityState)this).rigidbodyMotor).enabled = true; } if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbody)) { ((EntityState)this).rigidbody.useGravity = bodyHadGravity; ((EntityState)this).rigidbody.isKinematic = bodyWasKinematic; } if (NetworkServer.active) { CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); } Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { ((Behaviour)modelAnimator).enabled = true; } ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0040: 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_0054: 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_007c: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Expected O, but got Unknown //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0207: 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_0211: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_023b: 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) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0257: 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_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (friendlyDrop && ((EntityState)this).isLocalPlayer) { PerformInputs(); } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity += Vector3.up * extraGravity * Time.fixedDeltaTime; } else { Rigidbody obj = (Object.op_Implicit((Object)(object)((EntityState)this).rigidbody) ? ((EntityState)this).rigidbody : tempRigidbody); obj.velocity += Vector3.up * extraGravity * Time.fixedDeltaTime; } if (!(((EntityState)this).fixedAge > absoluteMaxTime) && (!detonateNextFrame || (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && (!((BaseCharacterController)((EntityState)this).characterMotor).Motor.GroundingStatus.IsStableOnGround || ((BaseCharacterController)((EntityState)this).characterMotor).Motor.LastGroundingStatus.IsStableOnGround)))) { return; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } else if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbody)) { ((EntityState)this).rigidbody.velocity = Vector3.zero; } else if (Object.op_Implicit((Object)(object)tempRigidbody)) { tempRigidbody.velocity = Vector3.zero; } Util.PlaySound("ChirrThrowHitGround", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { EffectManager.SpawnEffect(hitGroundEffect, new EffectData { origin = ((EntityState)this).characterBody.footPosition, scale = 1.25f }, true); if (Object.op_Implicit((Object)(object)inflictor)) { CharacterBody component = inflictor.GetComponent(); float num = (Object.op_Implicit((Object)(object)component) ? component.damage : 12f); new BlastAttack { position = ((EntityState)this).characterBody.footPosition, baseDamage = damageCoefficient * num, baseForce = force, bonusForce = Vector3.up * bounceForce, radius = blastRadius, attacker = inflictor, inflictor = inflictor, teamIndex = component.teamComponent.teamIndex, crit = component.RollCrit(), procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, falloffModel = (FalloffModel)1, damageColorIndex = (DamageColorIndex)0, damageType = (DamageType)32, attackerFiltering = (AttackerFiltering)0 }.Fire(); } } if (Object.op_Implicit((Object)(object)tempRigidbody)) { EntityState.Destroy((Object)(object)tempRigidbody); } if (Object.op_Implicit((Object)(object)tempSphereCollider)) { EntityState.Destroy((Object)(object)tempSphereCollider); } ((EntityState)this).outer.SetNextStateToMain(); } protected void PerformInputs() { if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator)) { PerformInput(((EntityState)this).skillLocator.primary, ref ((EntityState)this).inputBank.skill1); PerformInput(((EntityState)this).skillLocator.secondary, ref ((EntityState)this).inputBank.skill2); PerformInput(((EntityState)this).skillLocator.utility, ref ((EntityState)this).inputBank.skill3); PerformInput(((EntityState)this).skillLocator.special, ref ((EntityState)this).inputBank.skill4); } } private void PerformInput(GenericSkill skillSlot, ref ButtonState buttonState) { if (buttonState.down && Object.op_Implicit((Object)(object)skillSlot) && (!skillSlot.mustKeyPress || !buttonState.hasPressBeenClaimed) && skillSlot.ExecuteIfReady()) { buttonState.hasPressBeenClaimed = true; } } public override InterruptPriority GetMinimumInterruptPriority() { if (friendlyDrop) { return (InterruptPriority)1; } return (InterruptPriority)5; } public override void OnSerialize(NetworkWriter writer) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnSerialize(writer); writer.Write(initialVelocity); writer.Write(friendlyDrop); } public override void OnDeserialize(NetworkReader reader) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnDeserialize(reader); initialVelocity = reader.ReadVector3(); friendlyDrop = reader.ReadBoolean(); } } public class FireTriLeaf : BaseSkillState { public static GameObject projectilePrefab; public string soundString; public GameObject muzzleEffectPrefab; public static float baseDuration = 0.8f; public static float fireTime = 0.3f; public static int numShots = 3; public static float bloom = 1f; public static float recoilAmplitude = 0.1f; public static float damageCoefficient; public static float procCoefficient; public static float force; public static float pitchCoefficient = 0.5f; public static float minSpreadCoefficient = 0.5f; public static float minSpread = 0f; public static float maxSpread = 5.5f; private float duration; private int shotsFired; private float fireInterval; private float fireStopwatch; private bool isCrit; [NonSerialized] private static bool additivetest = true; [NonSerialized] private static bool fullbodytest = false; public override void OnEnter() { ((BaseState)this).OnEnter(); ((BaseState)this).StartAimMode(2f, false); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireInterval = duration * fireTime / (float)numShots; isCrit = ((BaseState)this).RollCrit(); Util.PlaySound("ChirrFirePrimary", ((EntityState)this).gameObject); string text = (fullbodytest ? "FullBody, " : "Gesture, "); text += (additivetest ? "Additive" : "Override"); ((EntityState)this).PlayAnimation(text, "FirePrimary", "Primary.playbackRate", duration); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); fireStopwatch -= Time.fixedDeltaTime; if (fireStopwatch <= 0f && shotsFired < numShots) { fireStopwatch += fireInterval; Fire(); } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: 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) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) shotsFired++; Util.PlaySound("ChirrFirePrimarySingle", ((EntityState)this).gameObject); ((BaseState)this).AddRecoil(-1f * recoilAmplitude, -1.5f * recoilAmplitude, -0.25f * recoilAmplitude, 0.25f * recoilAmplitude); ((EntityState)this).characterBody.AddSpreadBloom(bloom); if (((EntityState)this).isAuthority) { float num = Mathf.Lerp(minSpread, maxSpread * minSpreadCoefficient, (float)shotsFired / (float)numShots); float num2 = Mathf.Lerp(minSpread, maxSpread, (float)shotsFired / (float)numShots); Ray aimRay = ((BaseState)this).GetAimRay(); ((Ray)(ref aimRay)).direction = Util.ApplySpread(((Ray)(ref aimRay)).direction, num, num2, 1f, pitchCoefficient, 0f, 0f); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * damageCoefficient, force, isCrit, (DamageColorIndex)0, (GameObject)null, -1f); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class GrabDash : BaseSkillState { public static float baseDuration = 0.75f; public static float dashSpeed = 7.5f; public static float minGrabRadius = 4f; public static float maxGrabRadius = 8f; public static float grabSearchFrequency = 20f; public static float maxTurnAnglePerSecond = 30f; private float stopwatch; private float duration; private Vector3 currentAimVector; private AnimationCurve speedCurve; private float grabSearchTimer; private GrabController grabController; public override void OnEnter() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); speedCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0.2f); duration = baseDuration; currentAimVector = ((EntityState)this).inputBank.aimDirection; ((EntityState)this).characterDirection.forward = currentAimVector; grabController = ((EntityState)this).GetComponent(); Util.PlaySound("ChirrDashStart", ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("FullBody, Override", "GrabDash", "Utility.playbackRate", duration); } public override void FixedUpdate() { //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_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; Vector3 aimDirection = ((EntityState)this).inputBank.aimDirection; currentAimVector = Vector3.RotateTowards(currentAimVector, aimDirection, MathF.PI / 180f * maxTurnAnglePerSecond * Time.deltaTime, 0f); ((EntityState)this).characterDirection.forward = currentAimVector; float num = speedCurve.Evaluate(stopwatch / duration) * dashSpeed; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += currentAimVector * num * ((BaseState)this).moveSpeedStat * Time.fixedDeltaTime; ((EntityState)this).characterMotor.velocity.y = 0f; if (((EntityState)this).isAuthority) { grabSearchTimer -= Time.fixedDeltaTime; if (grabSearchTimer <= 0f) { grabSearchTimer += 1f / grabSearchFrequency; float grabRadius = Mathf.Lerp(minGrabRadius, maxGrabRadius, stopwatch / duration); AttemptGrab(grabRadius); } } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).characterMotor.velocity = currentAimVector * num * ((BaseState)this).moveSpeedStat; ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public void AttemptGrab(float grabRadius) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0034: 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) SphereSearch val = new SphereSearch { radius = grabRadius, origin = ((EntityState)this).characterBody.corePosition, queryTriggerInteraction = (QueryTriggerInteraction)1, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask }; val.RefreshCandidates(); val.FilterCandidatesByDistinctHurtBoxEntities(); HurtBox[] hurtBoxes = val.GetHurtBoxes(); foreach (HurtBox val2 in hurtBoxes) { if (Object.op_Implicit((Object)(object)val2)) { HealthComponent healthComponent = val2.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent) && (Object)(object)((Component)healthComponent).gameObject != (Object)(object)((EntityState)this).gameObject && (!healthComponent.body.isChampion || (((Object)((Component)healthComponent).gameObject).name.Contains("Brother") && ((Object)((Component)healthComponent).gameObject).name.Contains("Body")) || Object.op_Implicit((Object)(object)((Component)healthComponent.body).GetComponent())) && BodyIsGrabbable(((Component)healthComponent).gameObject)) { OnGrabBodyAuthority(val2.healthComponent.body); } } } } private bool BodyIsGrabbable(GameObject candidate) { if (GrabController.victimsToGrabControllers.TryGetValue(((EntityState)this).gameObject, out var value) && Object.op_Implicit((Object)(object)value) && ((Object)(object)((Component)value).gameObject != (Object)(object)candidate || (Object)(object)value.victimBodyObject != (Object)null)) { return false; } return true; } public void OnGrabBodyAuthority(CharacterBody body) { if (Object.op_Implicit((Object)(object)grabController)) { grabController.AttemptGrab(((Component)body).gameObject); } ((EntityState)this).outer.SetNextStateToMain(); EntityStateMachine val = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Wings"); if (Object.op_Implicit((Object)(object)val)) { val.SetNextState((EntityState)(object)new BoostUp()); } EntityStateMachine val2 = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Claws"); if (Object.op_Implicit((Object)(object)val2)) { val2.SetNextState((EntityState)(object)new Grabbing()); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class SpitBomb : BaseSkillState { public static GameObject projectilePrefab; 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 selfAwayForce = 11f; public static float selfUpForce = 11f; private bool hasFired; public float duration; [NonSerialized] private static bool additivetest = true; [NonSerialized] private static bool fullbodytest = true; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(2f, false); string text = (fullbodytest ? "FullBody, " : "Gesture, "); text += (additivetest ? "Additive" : "Override"); ((EntityState)this).PlayAnimation(text, "FireSecondary", "Secondary.playbackRate", duration); } 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(); } } 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_008a: 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_009c: 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_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_0169: 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_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound("ChirrFireSpitBomb", ((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 direction = ((Ray)(ref aimRay)).direction; if (!((EntityState)this).isAuthority) { return; } Vector3 val = -1f * direction * selfAwayForce; val += Vector3.up * selfUpForce; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((BaseState)this).isGrounded) { float num = Mathf.Max(((EntityState)this).characterMotor.velocity.y, val.y); ((EntityState)this).characterMotor.velocity = new Vector3(((EntityState)this).characterMotor.velocity.x + val.x, num, ((EntityState)this).characterMotor.velocity.z + val.z); EntityStateMachine obj = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Wings"); if (((obj != null) ? ((object)obj.state).GetType() : null) != typeof(Idle)) { ((EntityState)this).characterBody.isSprinting = true; } } FireProjectileInfo val2 = default(FireProjectileInfo); val2.projectilePrefab = projectilePrefab; val2.position = ((Ray)(ref aimRay)).origin; val2.rotation = Util.QuaternionSafeLookRotation(direction); val2.owner = ((EntityState)this).gameObject; val2.damage = ((BaseState)this).damageStat * damageCoefficient; val2.force = force; val2.crit = ((BaseState)this).RollCrit(); ProjectileManager.instance.FireProjectile(val2); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class SpitBombFuse : AimThrowableBase { private static GameObject INDICATOR = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/BasicThrowableVisualizer.prefab").WaitForCompletion(); [NonSerialized] public static float maxDistanceee = 30f; public override void OnEnter() { base.arcVisualizerPrefab = INDICATOR; base.endpointVisualizerPrefab = ArrowRain.areaIndicatorPrefab; base.rayRadius = 0.5f; base.useGravity = true; base.maxDistance = maxDistanceee; base.minimumDuration = 0.15f; base.baseMinimumDuration = 0.15f; base.setFuse = true; ((BaseState)this).StartAimMode(2f, false); ((AimThrowableBase)this).OnEnter(); } public override void FireProjectile() { ((AimThrowableBase)this).FireProjectile(); Util.PlaySound("Play_nemmerc_knife_throw", ((EntityState)this).gameObject); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } } namespace EntityStates.Chirr.Wings { public class BoostUp : BaseState { private Transform hoverEffect; public float boostVelocity; public static float boostAcceleration = 90f; public static float baseDuration = 1f; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration; Util.PlaySound("ChirrGrabFlyUp", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(); } } public override void FixedUpdate() { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { if (((BaseState)this).isGrounded) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(); } float y = ((EntityState)this).characterMotor.velocity.y; float num = Mathf.Lerp(boostAcceleration, 0f, ((EntityState)this).fixedAge / duration); y += num * Time.fixedDeltaTime; ((EntityState)this).characterMotor.velocity = new Vector3(((EntityState)this).characterMotor.velocity.x, y, ((EntityState)this).characterMotor.velocity.z); } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } } public class WingsOn : BaseState { private Transform hoverEffect; public static float hoverVelocity = -3f; public static float hoverAcceleration = 50f; private uint soundId; private float graceTimer = 0.6f; private Animator animator; public override void OnEnter() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).PlayAnimation("Body", "EnterHover"); animator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)animator)) { animator.SetBool("inHover", true); } Util.PlaySound("ChirrSprintStart", ((EntityState)this).gameObject); soundId = Util.PlaySound("ChirrSprintLoop", ((EntityState)this).gameObject); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 0x20); } public override void FixedUpdate() { //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) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.isSprinting = true; if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { float y = ((EntityState)this).characterMotor.velocity.y; y = Mathf.MoveTowards(y, hoverVelocity, hoverAcceleration * Time.fixedDeltaTime); y = Mathf.Max(((EntityState)this).characterMotor.velocity.y, y); ((EntityState)this).characterMotor.velocity = new Vector3(((EntityState)this).characterMotor.velocity.x, y, ((EntityState)this).characterMotor.velocity.z); if (((EntityState)this).characterMotor.velocity.y >= 0f) { graceTimer -= Time.fixedDeltaTime; } else { graceTimer = 0.6f; } if (!((EntityState)this).inputBank.jump.down || !(graceTimer > 0f) || ((EntityState)this).characterMotor.isGrounded) { ((EntityState)this).outer.SetNextStateToMain(); } } } public override void OnExit() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -33); AkSoundEngine.StopPlayingID(soundId); Util.PlaySound("ChirrSprintStop", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)animator)) { animator.SetBool("inHover", false); } } } } namespace EntityStates.Chirr.Claws { public class ClawMelee : BaseState { } public class Grabbing : BaseState { public static SkillDef overrideDef; private GrabController grabController; private GrabController victimGrabController; private Collider victimCollider; public static float releaseVictimDistance = 3f; public static float graceTimer = 1.5f; private Transform dropVisualizer; private Animator animator; public override void OnEnter() { //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).PlayAnimation("FullBody, Override", "GrabSuccess"); Util.PlaySound("ChirrGrabStart", ((EntityState)this).gameObject); grabController = ((EntityState)this).GetComponent(); if (((EntityState)this).isAuthority) { victimCollider = grabController.victimColliders[0]; victimGrabController = grabController.victimBodyObject.GetComponent(); } ((EntityState)this).skillLocator.utility.SetSkillOverride((object)((EntityState)this).gameObject, overrideDef, (SkillOverridePriority)4); animator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)animator)) { animator.SetBool("inGrab", true); } dropVisualizer = ((BaseState)this).FindModelChild("DropAngleCone"); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)dropVisualizer)) { ((Component)dropVisualizer).gameObject.SetActive(true); ((Component)dropVisualizer).transform.localScale = AimDrop.maxRayDistance * Vector3.one; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(); } } public override void FixedUpdate() { //IL_00e1: 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_0101: 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_011c: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!((EntityState)this).isAuthority) { return; } if (Object.op_Implicit((Object)(object)grabController) && !grabController.IsGrabbing()) { ((EntityState)this).outer.SetNextStateToMain(); return; } if (!grabController.victimInfo.body.healthComponent.alive) { grabController.AttemptGrab(null); ((EntityState)this).outer.SetNextStateToMain(); return; } if (Object.op_Implicit((Object)(object)victimGrabController) && victimGrabController.IsGrabbing() && (Object)(object)victimGrabController.victimBodyObject == (Object)(object)((EntityState)this).gameObject) { grabController.AttemptGrab(null); ((EntityState)this).outer.SetNextStateToMain(); } if (((EntityState)this).fixedAge < graceTimer) { return; } if (((BaseState)this).isGrounded) { grabController.AttemptGrab(null); ((EntityState)this).outer.SetNextStateToMain(); return; } Vector3 betterFootPosition = GetBetterFootPosition(); if (((EntityState)this).characterMotor.velocity.y < 0f && Physics.Raycast(betterFootPosition, ((Vector3)(ref ((EntityState)this).characterMotor.velocity)).normalized, releaseVictimDistance, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1)) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 9f); EntityStateMachine val = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Weapon"); if (Object.op_Implicit((Object)(object)val) && val.state is AimDrop) { val.SetNextStateToMain(); } else { grabController.AttemptGrab(null); } ((EntityState)this).outer.SetNextStateToMain(); } } public Vector3 GetBetterFootPosition() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0062: 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) Vector3 position = grabController.victimBodyObject.transform.position; if (Object.op_Implicit((Object)(object)grabController.victimInfo.characterMotor)) { return grabController.victimInfo.body.footPosition; } if (Object.op_Implicit((Object)(object)victimCollider)) { Bounds bounds = victimCollider.bounds; position.y = ((Bounds)(ref bounds)).min.y; return position; } return position; } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)animator)) { animator.SetBool("inGrab", false); } if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)grabController) && grabController.IsGrabbing()) { grabController.AttemptGrab(null); } if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)dropVisualizer)) { ((Component)dropVisualizer).gameObject.SetActive(false); } ((EntityState)this).skillLocator.utility.UnsetSkillOverride((object)((EntityState)this).gameObject, overrideDef, (SkillOverridePriority)4); } } } namespace EntityStates.Beastmaster { public class BeastmasterMain : GenericCharacterMain { public static AnimationCurve flutterVelocityCurve; public static float holdTimeToFlutter; public static float flutterHorizontalVelocity; public static float flutterVerticalVelocity; private float flutterStopwatch; private bool hasUsedFlutter; } } namespace EntityStates.Beastmaster.Weapon { public class FireHitscanDart : GenericBulletBaseState { [SerializeField] public bool isPiercing; public override void ModifyBullet(BulletAttack bulletAttack) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) if (isPiercing) { bulletAttack.stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask; } bulletAttack.modifyOutgoingDamageCallback = (ModifyOutgoingDamageCallback)delegate(BulletAttack _bulletAttack, ref BulletHit hitInfo, DamageInfo damageInfo) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) HealthComponent val = null; if (Object.op_Implicit((Object)(object)hitInfo.hitHurtBox)) { val = hitInfo.hitHurtBox.healthComponent; } if (Object.op_Implicit((Object)(object)val) && !FriendlyFireManager.ShouldDirectHitProceed(val, ((EntityState)this).characterBody.teamComponent.teamIndex)) { val.TakeDamage(damageInfo); GlobalEventManager.instance.OnHitEnemy(damageInfo, hitInfo.entityObject); } GlobalEventManager.instance.OnHitAll(damageInfo, hitInfo.entityObject); }; } } internal class FireTriScatterBullet : BaseSkillState { [Tooltip("Minimum duration before it can get interrupted.")] [SerializeField] public float minimumDuration; [Tooltip("How much the duration should last.")] [SerializeField] public float baseTargetDuration; [Tooltip("Amount of volleys to do before finishing.")] [SerializeField] public float baseTargetAmountOfVolleys; [Tooltip("Amount of scatter to spawn per volley.")] [SerializeField] public float baseAmountOfScatterPerVolley; [Tooltip("Amount of bullets groups to spawn per scatter.")] [SerializeField] public float baseAmountOfBulletsPerScatter; [SerializeField] public float baseBulletDamageCoefficient; [SerializeField] public float baseBulletProcCoefficient; [SerializeField] public float baseBulletRadius; [SerializeField] public float baseBulletForce; [SerializeField] public float minSpread; [SerializeField] public float maxSpread; [SerializeField] public float spreadPitchScale = 0.5f; [SerializeField] public float spreadYawScale = 1f; [SerializeField] public float spreadBloomValue = 0.2f; [SerializeField] public float recoilAmplitudeY; [SerializeField] public float recoilAmplitudeX; [SerializeField] public float raycastMaxLength; [SerializeField] public float bulletMaxLength; [SerializeField] public bool useSmartCollision; [SerializeField] public string enterSoundString; [SerializeField] public string fireSoundString; [SerializeField] public GameObject tracerEffectPrefab; [SerializeField] public GameObject hitEffectPrefab; [SerializeField] public GameObject muzzleEffectPrefab; [Tooltip("Transform names in the Child Locator to use in the FIRST volley, LEFT.")] [SerializeField] public string muzzleFirstVolleyLeft; [Tooltip("Transform names in the Child Locator to use in the FIRST volley, RIGHT.")] [SerializeField] public string muzzleFirstVolleyRight; [Tooltip("Transform names in the Child Locator to use in the SECOND volley, LEFT.")] [SerializeField] public string muzzleSecondVolleyLeft; [Tooltip("Transform names in the Child Locator to use in the SECOND volley, RIGHT.")] [SerializeField] public string muzzleSecondVolleyRight; [Tooltip("Transform names in the Child Locator to use in the THIRD volley, LEFT.")] [SerializeField] public string muzzleThirdVolleyLeft; [Tooltip("Transform names in the Child Locator to use in the THIRD volley, RIGHT.")] [SerializeField] public string muzzleThirdVolleyRight; [SerializeField] public bool useComboFinalizerState; private ChildLocator childLocator; private float countdownSinceLastVolley; private int volleyCount; private bool buttonReleased; private float duration => baseTargetDuration / ((BaseState)this).attackSpeedStat; private float delayBetweenVolleys => duration / baseTargetAmountOfVolleys; protected BulletAttack GenerateBulletAttack(Ray aimRay, string muzzleName) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0071: 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) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0092: 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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_00dc: 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_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Expected O, but got Unknown float num = 0f; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { num = ((EntityState)this).characterBody.spreadBloomAngle; } return new BulletAttack { aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, owner = ((EntityState)this).gameObject, weapon = null, bulletCount = (uint)baseAmountOfBulletsPerScatter, damage = ((BaseState)this).damageStat * baseBulletDamageCoefficient, damageColorIndex = (DamageColorIndex)0, damageType = (DamageType)0, falloffModel = (FalloffModel)2, force = baseBulletForce, HitEffectNormal = false, procChainMask = default(ProcChainMask), procCoefficient = baseBulletProcCoefficient, maxDistance = bulletMaxLength, radius = baseBulletRadius, isCrit = ((BaseState)this).RollCrit(), muzzleName = muzzleName, minSpread = minSpread, maxSpread = maxSpread + num, hitEffectPrefab = hitEffectPrefab, smartCollision = useSmartCollision, sniper = false, spreadPitchScale = spreadPitchScale, spreadYawScale = spreadYawScale, tracerEffectPrefab = tracerEffectPrefab }; } public override void OnEnter() { ((BaseState)this).OnEnter(); ((BaseState)this).StartAimMode(duration, false); ModelLocator component = ((Component)((EntityState)this).characterBody).GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.modelTransform)) { childLocator = ((Component)component.modelTransform).GetComponent(); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); countdownSinceLastVolley -= Time.fixedDeltaTime; if ((float)volleyCount < baseTargetAmountOfVolleys && countdownSinceLastVolley <= 0f) { volleyCount++; countdownSinceLastVolley += delayBetweenVolleys; for (int i = 0; (float)i < baseAmountOfScatterPerVolley; i++) { FireScatterShot(volleyCount, i); } } if (!buttonReleased && !((BaseSkillState)this).IsKeyDownAuthority()) { buttonReleased = true; } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { if (!buttonReleased && useComboFinalizerState) { ((EntityState)this).outer.SetNextState((EntityState)(object)new FireHitscanDart()); } else { ((EntityState)this).outer.SetNextStateToMain(); } } } public override InterruptPriority GetMinimumInterruptPriority() { if (!(((EntityState)this).fixedAge <= minimumDuration) && buttonReleased) { return (InterruptPriority)0; } return (InterruptPriority)2; } private void FireScatterShot(int currentVolley, int currentShotInVolley) { //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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: 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_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0141: 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_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) string text = ""; Ray aimRay = ((BaseState)this).GetAimRay(); if (Object.op_Implicit((Object)(object)childLocator)) { text = (currentVolley % 3) switch { 2 => (currentShotInVolley % 2 != 0) ? muzzleSecondVolleyRight : muzzleSecondVolleyLeft, 1 => (currentShotInVolley % 2 != 0) ? muzzleFirstVolleyRight : muzzleFirstVolleyLeft, _ => (currentShotInVolley % 2 != 0) ? muzzleThirdVolleyRight : muzzleThirdVolleyLeft, }; } if (text.Length <= 0) { return; } Transform val = childLocator.FindChild(text); if (!Object.op_Implicit((Object)(object)val)) { return; } ((Ray)(ref aimRay)).origin = val.position; Util.PlaySound(fireSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)muzzleEffectPrefab)) { EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, text, false); } if (((EntityState)this).isAuthority) { Ray aimRay2 = ((BaseState)this).GetAimRay(); RaycastHit val2 = default(RaycastHit); if (Util.CharacterRaycast(((EntityState)this).gameObject, aimRay2, ref val2, raycastMaxLength, LayerMask.op_Implicit(LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)), (QueryTriggerInteraction)1)) { ((Ray)(ref aimRay)).direction = ((RaycastHit)(ref val2)).point - ((Ray)(ref aimRay)).origin; } else { ((Ray)(ref aimRay)).direction = ((Ray)(ref aimRay2)).direction * raycastMaxLength - ((Ray)(ref aimRay)).origin; } FireBullet(aimRay, text); } } protected virtual void FireBullet(Ray aimRay, string muzzleName) { //IL_0001: 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) ((BaseState)this).StartAimMode(aimRay, 3f, false); ((BaseState)this).AddRecoil(-1f * recoilAmplitudeY, -1.5f * recoilAmplitudeY, -1f * recoilAmplitudeX, 1f * recoilAmplitudeX); if (((EntityState)this).isAuthority) { GenerateBulletAttack(aimRay, muzzleName).Fire(); } } } internal class FireTriScatterProjectile : BaseSkillState { [Tooltip("Minimum duration before it can get interrupted.")] [SerializeField] public float minimumDuration; [Tooltip("How much the duration should last.")] [SerializeField] public float baseTargetDuration; [Tooltip("Amount of volleys to do before finishing.")] [SerializeField] public float baseTargetAmountOfVolleys; [Tooltip("Amount of projectiles to spawn per volley.")] [SerializeField] public float baseAmountOfScatterPerVolley; [SerializeField] public float baseProjectileDamageCoefficient; [SerializeField] public float baseProjectileDesiredSpeed; [SerializeField] public float baseProjectileForce; [SerializeField] public float raycastMaxLength; [SerializeField] public GameObject projectilePrefab; [SerializeField] public GameObject muzzleEffectPrefab; [Tooltip("Transform names in the Child Locator to use in the FIRST volley, LEFT.")] [SerializeField] public string muzzleFirstVolleyLeft; [Tooltip("Transform names in the Child Locator to use in the FIRST volley, RIGHT.")] [SerializeField] public string muzzleFirstVolleyRight; [Tooltip("Transform names in the Child Locator to use in the SECOND volley, LEFT.")] [SerializeField] public string muzzleSecondVolleyLeft; [Tooltip("Transform names in the Child Locator to use in the SECOND volley, RIGHT.")] [SerializeField] public string muzzleSecondVolleyRight; [Tooltip("Transform names in the Child Locator to use in the THIRD volley, LEFT.")] [SerializeField] public string muzzleThirdVolleyLeft; [Tooltip("Transform names in the Child Locator to use in the THIRD volley, RIGHT.")] [SerializeField] public string muzzleThirdVolleyRight; [SerializeField] public bool useComboFinalizerState; private ChildLocator childLocator; private float countdownSinceLastVolley; private int volleyCount; private bool buttonReleased; private float duration => baseTargetDuration / ((BaseState)this).attackSpeedStat; private float delayBetweenVolleys => duration / baseTargetAmountOfVolleys; public override void OnEnter() { ((BaseState)this).OnEnter(); ((BaseState)this).StartAimMode(duration, false); ModelLocator component = ((Component)((EntityState)this).characterBody).GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.modelTransform)) { childLocator = ((Component)component.modelTransform).GetComponent(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); countdownSinceLastVolley -= Time.fixedDeltaTime; if ((float)volleyCount < baseTargetAmountOfVolleys && countdownSinceLastVolley <= 0f) { volleyCount++; countdownSinceLastVolley += delayBetweenVolleys; for (int i = 0; (float)i < baseAmountOfScatterPerVolley; i++) { FireScatterShot(volleyCount, i); } } if (!buttonReleased && !((BaseSkillState)this).IsKeyDownAuthority()) { buttonReleased = true; } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { if (!buttonReleased && useComboFinalizerState) { ((EntityState)this).outer.SetNextState((EntityState)(object)new FireHitscanDart()); } else { ((EntityState)this).outer.SetNextStateToMain(); } } } public override InterruptPriority GetMinimumInterruptPriority() { if (!(((EntityState)this).fixedAge <= minimumDuration) && buttonReleased) { return (InterruptPriority)0; } return (InterruptPriority)2; } private void FireScatterShot(int currentVolley, int currentShotInVolley) { //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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: 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_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_013a: 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_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_017a: 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_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) string text = ""; Ray aimRay = ((BaseState)this).GetAimRay(); if (Object.op_Implicit((Object)(object)childLocator)) { text = (currentVolley % 3) switch { 2 => (currentShotInVolley % 2 != 0) ? muzzleSecondVolleyRight : muzzleSecondVolleyLeft, 1 => (currentShotInVolley % 2 != 0) ? muzzleFirstVolleyRight : muzzleFirstVolleyLeft, _ => (currentShotInVolley % 2 != 0) ? muzzleThirdVolleyRight : muzzleThirdVolleyLeft, }; } if (text.Length <= 0) { return; } Transform val = childLocator.FindChild(text); if (!Object.op_Implicit((Object)(object)val)) { return; } ((Ray)(ref aimRay)).origin = val.position; if (Object.op_Implicit((Object)(object)muzzleEffectPrefab)) { EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, text, false); } if (((EntityState)this).isAuthority) { Ray aimRay2 = ((BaseState)this).GetAimRay(); RaycastHit val2 = default(RaycastHit); if (Util.CharacterRaycast(((EntityState)this).gameObject, aimRay2, ref val2, raycastMaxLength, LayerMask.op_Implicit(LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)), (QueryTriggerInteraction)1)) { ((Ray)(ref aimRay)).direction = ((RaycastHit)(ref val2)).point - ((Ray)(ref aimRay)).origin; } else { ((Ray)(ref aimRay)).direction = ((Ray)(ref aimRay2)).direction * raycastMaxLength - ((Ray)(ref aimRay)).origin; } if ((Object)(object)projectilePrefab != (Object)null) { FireProjectileInfo val3 = default(FireProjectileInfo); val3.projectilePrefab = projectilePrefab; val3.position = ((Ray)(ref aimRay)).origin; val3.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); val3.owner = ((EntityState)this).gameObject; val3.damage = ((BaseState)this).damageStat * baseProjectileDamageCoefficient; val3.force = baseProjectileForce; val3.crit = ((BaseState)this).RollCrit(); ((FireProjectileInfo)(ref val3)).speedOverride = baseProjectileDesiredSpeed; FireProjectileInfo val4 = val3; ProjectileManager.instance.FireProjectile(val4); } } } } internal class WindReflectionPush : GenericProjectileBaseState { [SerializeField] public string enterSoundString; [SerializeField] public float reflectDamageMultiplier; [Tooltip("Modify the origin of the aimray used for the projectile reflection.")] [SerializeField] public float backupDistance; [SerializeField] public int maxReflectDistance; [SerializeField] public GameObject reflectTracerEffectPrefab; private Ray aimRay; public override void OnEnter() { //IL_0008: 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_002a: 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_0047: 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_0057: Unknown result type (might be due to invalid IL or missing references) ((GenericProjectileBaseState)this).OnEnter(); aimRay = ((BaseState)this).GetAimRay(); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); _ = ((Ray)(ref aimRay)).origin; ((Ray)(ref aimRay)).origin = ((Ray)(ref aimRay)).origin - ((Ray)(ref aimRay)).direction * backupDistance; if (NetworkServer.active) { ReflectProjectiles(); } } public override void PlayAnimation(float duration) { } public override Ray ModifyProjectileAimRay(Ray aimRay) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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) Vector3 direction = ((Ray)(ref aimRay)).direction; ((Vector3)(ref direction)).Scale(new Vector3(1f, 0f, 1f)); return aimRay; } private void ReflectProjectiles() { //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_007b: 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_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) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0156: 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_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0102: 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_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Expected O, but got Unknown //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: 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_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: 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 = maxReflectDistance * maxReflectDistance; List instancesList = InstanceTracker.GetInstancesList(); List list = new List(); int i = 0; for (int count = instancesList.Count; i < count; i++) { ProjectileController val3 = instancesList[i]; if (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)) { continue; } Vector3 position = ((Component)val5).transform.position; Vector3 start = val; if (Object.op_Implicit((Object)(object)reflectTracerEffectPrefab)) { EffectData val6 = new EffectData { origin = position, start = start }; EffectManager.SpawnEffect(reflectTracerEffectPrefab, val6, true); } CharacterBody component = val5.owner.GetComponent(); val5.IgnoreCollisionsWithOwner(false); val5.Networkowner = ((EntityState)this).gameObject; val5.teamFilter.teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex; ProjectileDamage component2 = ((Component)val5).GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.damage *= reflectDamageMultiplier; } Rigidbody component3 = ((Component)val5).GetComponent(); if (Object.op_Implicit((Object)(object)component3)) { Vector3 val7 = component3.velocity * -1f; if (Object.op_Implicit((Object)(object)component)) { val7 = component.corePosition - ((Component)component3).transform.position; } ((Component)component3).transform.forward = val7; component3.velocity = Vector3.RotateTowards(component3.velocity, val7, float.PositiveInfinity, 0f); } } } } } namespace EntityStates.Beastmaster.SideWeapon { internal class HealSphere { } } namespace EntityStates.Agarthan { internal class Bite : BasicMeleeAttack { public override void OnEnter() { ((BasicMeleeAttack)this).OnEnter(); base.swingEffectPrefab = Bite.biteEffectPrefab; base.hitEffectPrefab = Bite.hitEffectPrefab; ((EntityState)this).PlayCrossfade("Gesture", "Bite", "Bite.playbackRate", base.duration, 0.05f); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class Spit : BaseSkillState { public static float baseDuration; public static float baseDurToSpit; private float duration; private float durToSpit; private bool isSpitting; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; durToSpit = baseDurToSpit / ((BaseState)this).attackSpeedStat; ((EntityState)this).PlayAnimation("Gesture, Override", "StandUp"); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!isSpitting && Time.fixedDeltaTime >= durToSpit) { isSpitting = true; ((EntityState)this).PlayAnimation("Gesture, Override", "StandSpit"); } if (Time.fixedDeltaTime >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).PlayAnimation("Gesture, Override", "SpitExit"); } } } namespace EntityStates.AI.Walker { public class Fear : BaseAIState { public GameObject fearTarget; private float aiUpdateTimer; protected Vector3 myBodyFootPosition; private float lastPathUpdate; private float fallbackNodeStartAge; private readonly float fallbackNodeDuration = 4f; public override void OnEnter() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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) ((BaseAIState)this).OnEnter(); if (Object.op_Implicit((Object)(object)((BaseAIState)this).ai)) { Agent broadNavigationAgent = ((BaseAIState)this).ai.broadNavigationAgent; AgentOutput output = ((Agent)(ref broadNavigationAgent)).output; lastPathUpdate = ((AgentOutput)(ref output)).lastPathUpdate; broadNavigationAgent = ((BaseAIState)this).ai.broadNavigationAgent; ((Agent)(ref broadNavigationAgent)).InvalidatePath(); } fallbackNodeStartAge = float.NegativeInfinity; } public override void FixedUpdate() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown ((BaseAIState)this).FixedUpdate(); if (!Object.op_Implicit((Object)(object)((BaseAIState)this).ai) || !Object.op_Implicit((Object)(object)((BaseAIState)this).body)) { return; } aiUpdateTimer -= Time.fixedDeltaTime; UpdateFootPosition(); if (aiUpdateTimer <= 0f) { aiUpdateTimer = BaseAIState.cvAIUpdateInterval.value; UpdateAI(BaseAIState.cvAIUpdateInterval.value); if (!((BaseAIState)this).body.HasBuff(SS2Content.Buffs.BuffFear)) { ((EntityState)this).outer.SetNextState((EntityState)new LookBusy()); } } } protected void UpdateFootPosition() { //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_0017: 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_0020: Unknown result type (might be due to invalid IL or missing references) myBodyFootPosition = ((BaseAIState)this).body.footPosition; Agent broadNavigationAgent = ((BaseAIState)this).ai.broadNavigationAgent; ((Agent)(ref broadNavigationAgent)).currentPosition = myBodyFootPosition; } protected void UpdateAI(float deltaTime) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: 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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: 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_00d8: 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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: 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) SkillDriverEvaluation skillDriverEvaluation = ((BaseAIState)this).ai.skillDriverEvaluation; base.bodyInputs.moveVector = Vector3.zero; float num = 1f; if (!Object.op_Implicit((Object)(object)((BaseAIState)this).body) || !Object.op_Implicit((Object)(object)((BaseAIState)this).bodyInputBank)) { return; } Vector3 position = ((BaseAIState)this).bodyTransform.position; Agent broadNavigationAgent = ((BaseAIState)this).ai.broadNavigationAgent; AgentOutput output = ((Agent)(ref broadNavigationAgent)).output; GameObject val = (Object.op_Implicit((Object)(object)fearTarget) ? fearTarget : ((skillDriverEvaluation.target != null) ? skillDriverEvaluation.target.gameObject : null)); if (Object.op_Implicit((Object)(object)(((Object)(object)val != (Object)null) ? val.gameObject : null))) { Vector3 position2 = val.transform.position; Vector3 val2 = position; Vector3 val3 = position2 - myBodyFootPosition; Vector3 val4 = ((Vector3)(ref val3)).normalized * 10f; val2 -= val4; if (fallbackNodeStartAge + fallbackNodeDuration < ((EntityState)this).fixedAge) { ((BaseAIState)this).ai.SetGoalPosition((Vector3?)val2); } ((BaseAIState)this).ai.localNavigator.targetPosition = val2; ((BaseAIState)this).ai.localNavigator.allowWalkOffCliff = true; ((BaseAIState)this).ai.localNavigator.Update(deltaTime); base.bodyInputs.moveVector = ((BaseAIState)this).ai.localNavigator.moveVector; ref Vector3 moveVector = ref base.bodyInputs.moveVector; moveVector *= num; } if (((AgentOutput)(ref output)).lastPathUpdate > lastPathUpdate && !((AgentOutput)(ref output)).targetReachable && fallbackNodeStartAge + fallbackNodeDuration < ((EntityState)this).fixedAge) { ((Agent)(ref broadNavigationAgent)).goalPosition = ((BaseAIState)this).PickRandomNearbyReachablePosition(); ((Agent)(ref broadNavigationAgent)).InvalidatePath(); } lastPathUpdate = ((AgentOutput)(ref output)).lastPathUpdate; } public override BodyInputs GenerateBodyInputs(in BodyInputs previousBodyInputs) { //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_0086: Unknown result type (might be due to invalid IL or missing references) base.bodyInputs.pressSkill1 = false; base.bodyInputs.pressSkill2 = false; base.bodyInputs.pressSkill3 = false; base.bodyInputs.pressSkill4 = false; base.bodyInputs.pressSprint = false; base.bodyInputs.pressActivateEquipment = false; base.bodyInputs.desiredAimDirection = Vector3.zero; Target aimTarget = ((BaseAIState)this).ai.skillDriverEvaluation.aimTarget; if (aimTarget != null) { ((BaseAIState)this).AimAt(ref base.bodyInputs, aimTarget); } ((BaseAIState)this).ModifyInputsForJumpIfNeccessary(ref base.bodyInputs); return base.bodyInputs; } } public class FollowLeader : BaseAIState { public GameObject leader; private float aiUpdateTimer; protected Vector3 myBodyFootPosition; private float lastPathUpdate; private float fallbackNodeStartAge; private readonly float fallbackNodeDuration = 4f; public static float hardTrailDistance = 16f; public static float minTrailDistance = 8f; public static float trailHeight = 10f; public static float targetReachedDistance = 5f; private Vector3 targetTrailPosition; public override void OnEnter() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_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_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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) ((BaseAIState)this).OnEnter(); if (Object.op_Implicit((Object)(object)((BaseAIState)this).ai)) { Agent broadNavigationAgent = ((BaseAIState)this).ai.broadNavigationAgent; AgentOutput output = ((Agent)(ref broadNavigationAgent)).output; lastPathUpdate = ((AgentOutput)(ref output)).lastPathUpdate; broadNavigationAgent = ((BaseAIState)this).ai.broadNavigationAgent; ((Agent)(ref broadNavigationAgent)).InvalidatePath(); } targetTrailPosition = Vector2.op_Implicit(Random.insideUnitCircle * Random.Range(minTrailDistance, hardTrailDistance)); if (!Object.op_Implicit((Object)(object)leader) && Object.op_Implicit((Object)(object)((BaseAIState)this).ai.master.minionOwnership.ownerMaster)) { leader = ((BaseAIState)this).ai.master.minionOwnership.ownerMaster.GetBodyObject(); } fallbackNodeStartAge = float.NegativeInfinity; ((BaseAIState)this).ai.currentEnemy.Reset(); GlobalEventManager.onServerDamageDealt += CopyLeaderTarget; } public override void OnExit() { ((BaseAIState)this).OnExit(); GlobalEventManager.onServerDamageDealt -= CopyLeaderTarget; } private void CopyLeaderTarget(DamageReport damageReport) { if ((Object)(object)damageReport.attacker == (Object)(object)leader) { ((BaseAIState)this).ai.currentEnemy.gameObject = ((Component)damageReport.victim).gameObject; ((BaseAIState)this).ai.currentEnemy.bestHurtBox = damageReport.victimBody.mainHurtBox; } } private bool IsCombatDriver(AISkillDriver driver) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Invalid comparison between Unknown and I4 if (!Object.op_Implicit((Object)(object)driver)) { return false; } return (int)driver.skillSlot != -1; } public override void FixedUpdate() { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown ((BaseAIState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)((BaseAIState)this).ai) && Object.op_Implicit((Object)(object)((BaseAIState)this).body)) { if (IsCombatDriver(((BaseAIState)this).ai.skillDriverEvaluation.dominantSkillDriver)) { ((EntityState)this).outer.SetNextState((EntityState)new Combat()); } aiUpdateTimer -= Time.fixedDeltaTime; UpdateFootPosition(); if (aiUpdateTimer <= 0f) { aiUpdateTimer = BaseAIState.cvAIUpdateInterval.value; UpdateAI(BaseAIState.cvAIUpdateInterval.value); } } } protected void UpdateFootPosition() { //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_0017: 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_0020: Unknown result type (might be due to invalid IL or missing references) myBodyFootPosition = ((BaseAIState)this).body.footPosition; Agent broadNavigationAgent = ((BaseAIState)this).ai.broadNavigationAgent; ((Agent)(ref broadNavigationAgent)).currentPosition = myBodyFootPosition; } protected void UpdateAI(float deltaTime) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: 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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: 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_00b2: 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_0146: 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_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: 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_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) _ = ((BaseAIState)this).ai.skillDriverEvaluation; base.bodyInputs.moveVector = Vector3.zero; float num = 1f; if (!Object.op_Implicit((Object)(object)((BaseAIState)this).body) || !Object.op_Implicit((Object)(object)((BaseAIState)this).bodyInputBank)) { return; } Vector3 position = ((BaseAIState)this).bodyTransform.position; Agent broadNavigationAgent = ((BaseAIState)this).ai.broadNavigationAgent; AgentOutput output = ((Agent)(ref broadNavigationAgent)).output; if (Object.op_Implicit((Object)(object)leader)) { Vector3 val = leader.transform.position; Vector3 val2 = leader.transform.position - position; if (((Vector3)(ref val2)).magnitude <= hardTrailDistance) { val += targetTrailPosition; } val2 = val - position; bool flag = ((Vector3)(ref val2)).magnitude < targetReachedDistance; if (((BaseAIState)this).body.isFlying || !Object.op_Implicit((Object)(object)((BaseAIState)this).body.characterMotor)) { val.y += trailHeight; } if (fallbackNodeStartAge + fallbackNodeDuration < ((EntityState)this).fixedAge) { ((BaseAIState)this).ai.SetGoalPosition((Vector3?)val); } Vector3 targetPosition = (Vector3)(((??)((AgentOutput)(ref output)).nextPosition) ?? myBodyFootPosition); ((BaseAIState)this).ai.localNavigator.targetPosition = targetPosition; ((BaseAIState)this).ai.localNavigator.allowWalkOffCliff = true; ((BaseAIState)this).ai.localNavigator.Update(deltaTime); base.bodyInputs.moveVector = ((!flag) ? ((BaseAIState)this).ai.localNavigator.moveVector : Vector3.zero); ref Vector3 moveVector = ref base.bodyInputs.moveVector; moveVector *= num; } if (((AgentOutput)(ref output)).lastPathUpdate > lastPathUpdate && !((AgentOutput)(ref output)).targetReachable && fallbackNodeStartAge + fallbackNodeDuration < ((EntityState)this).fixedAge) { ((Agent)(ref broadNavigationAgent)).goalPosition = ((BaseAIState)this).PickRandomNearbyReachablePosition(); ((Agent)(ref broadNavigationAgent)).InvalidatePath(); } lastPathUpdate = ((AgentOutput)(ref output)).lastPathUpdate; } public override BodyInputs GenerateBodyInputs(in BodyInputs previousBodyInputs) { //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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) base.bodyInputs.pressSkill1 = false; base.bodyInputs.pressSkill2 = false; base.bodyInputs.pressSkill3 = false; base.bodyInputs.pressSkill4 = false; base.bodyInputs.pressSprint = false; base.bodyInputs.pressActivateEquipment = false; base.bodyInputs.desiredAimDirection = Vector3.zero; base.bodyInputs.desiredAimDirection = base.bodyInputs.moveVector; ((BaseAIState)this).ModifyInputsForJumpIfNeccessary(ref base.bodyInputs); return base.bodyInputs; } } } namespace Moonstorm.Starstorm2 { public class SS2Log { public static ManualLogSource logger; public SS2Log(ManualLogSource logger_) { logger = logger_; } internal static void Debug(object data, [CallerLineNumber] int i = 0, [CallerMemberName] string member = "") { logger.LogDebug((object)logString(data, i, member)); } internal static void Error(object data, [CallerLineNumber] int i = 0, [CallerMemberName] string member = "") { logger.LogError((object)logString(data, i, member)); } internal static void Fatal(object data, [CallerLineNumber] int i = 0, [CallerMemberName] string member = "") { logger.LogFatal((object)logString(data, i, member)); } internal static void Info(object data) { logger.LogInfo(data); } internal static void Message(object data) { logger.LogMessage(data); } internal static void Warning(object data) { logger.LogWarning(data); } private static string logString(object data, [CallerLineNumber] int i = 0, [CallerMemberName] string member = "") { return $"{data} :: Line: {i}, Method {member}"; } } public static class SS2Util { public static void DropShipCall(Transform origin, int tierWeight, uint teamLevel = 1u, int amount = 1, ItemTier forcetier = 0, string theWorstCodeOfTheYear = null) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Invalid comparison between Unknown and I4 //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Invalid comparison between Unknown and I4 //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: 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) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_017a: 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_0194: 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_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012c: 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) float num = (float)tierWeight * (MSUtil.InverseHyperbolicScaling(1f, 0.1f, 6f, (int)teamLevel) / (((float)(int)teamLevel + 14f) / (float)(int)teamLevel)); List list = (((int)forcetier == 4) ? Run.instance.availableBossDropList : (((int)forcetier == 3) ? Run.instance.availableLunarCombinedDropList : (Util.CheckRoll(1f * num, 0f, (CharacterMaster)null) ? Run.instance.availableTier3DropList : ((!Util.CheckRoll(20f * num, 0f, (CharacterMaster)null)) ? Run.instance.availableTier1DropList : Run.instance.availableTier2DropList)))); int num2 = Run.instance.treasureRng.RangeInt(0, list.Count); if (amount > 1) { float num3 = 360f / (float)amount; Vector3 val = Quaternion.AngleAxis((float)Random.Range(0, 360), Vector3.up) * (Vector3.up * 15f + Vector3.forward * (4.75f + 0.25f * (float)amount)); Quaternion val2 = Quaternion.AngleAxis(num3, Vector3.up); for (int i = 0; i < amount; i++) { PickupDropletController.CreatePickupDroplet(list[num2], origin.position, val); val = val2 * val; } return; } PickupIndex val3 = list[num2]; if (((PickupIndex)(ref val3)).itemIndex == SS2Content.Items.NkotasHeritage.itemIndex) { if (num2 != 0) { num2--; } else if (num2 != list.Count) { num2++; } } PickupDropletController.CreatePickupDroplet(list[num2], origin.position, new Vector3(0f, 15f, 0f)); } public static void RemoveDotStacks(CharacterBody victim, DotIndex TargetedIndex, int NumberOfStacksToRemove) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) DotController val = DotController.FindDotController(((Component)victim).gameObject); if (!Object.op_Implicit((Object)(object)val)) { return; } for (int num = val.dotStackList.Count - 1; num >= 0; num--) { if (val.dotStackList[num].dotIndex == TargetedIndex) { val.RemoveDotStackAtServer(num); NumberOfStacksToRemove--; if (NumberOfStacksToRemove <= 0) { break; } } } } public static bool CheckIsValidInteractable(IInteractable interactable, GameObject interactableObject) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown InteractionProcFilter component = interactableObject.GetComponent(); MonoBehaviour val = (MonoBehaviour)interactable; if (Object.op_Implicit((Object)(object)component)) { return component.shouldAllowOnInteractionBeginProc; } if (Object.op_Implicit((Object)(object)((Component)val).GetComponent())) { return false; } if (Object.op_Implicit((Object)(object)((Component)val).GetComponent())) { return false; } if (Object.op_Implicit((Object)(object)((Component)val).GetComponent())) { return false; } return true; } public static ItemDef NkotasRiggedItemDrop(int tierWeight, uint teamLevel = 1u, int forcetier = 0) { //IL_0094: 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) float num = (float)tierWeight * (float)(Math.Sqrt(teamLevel * 13) - 4.0); List list = ((!Util.CheckRoll(0.5f * num - 1f, 0f, (CharacterMaster)null) && (forcetier != 3 || forcetier == 0)) ? ((!Util.CheckRoll(4f * num, 0f, (CharacterMaster)null) && (forcetier != 2 || forcetier == 0)) ? Run.instance.availableTier1DropList : Run.instance.availableTier2DropList) : Run.instance.availableTier3DropList); int index = Run.instance.treasureRng.RangeInt(0, list.Count); return ItemCatalog.GetItemDef(PickupCatalog.GetPickupDef(list[index]).itemIndex); } public static void CreateVFXDroplet(PickupIndex pickupIndex, Vector3 position, Vector3 velocity, string vfxPrefab) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: 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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown CreatePickupInfo val = default(CreatePickupInfo); val.prefabOverride = PickupCatalog.GetPickupDef(pickupIndex).dropletDisplayPrefab; ((CreatePickupInfo)(ref val)).pickupIndex = pickupIndex; PickupDropletController.CreatePickupDroplet(val, position, velocity); EffectManager.SpawnEffect(SS2Assets.LoadAsset(vfxPrefab, SS2Bundle.All), new EffectData { rootObject = val.prefabOverride, origin = position, scale = 1f }, true); } public static void RefreshOldestBuffStack(CharacterBody charBody, BuffDef buff, float duration) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) float num = 9999f; int num2 = -1; List timedBuffs = charBody.timedBuffs; for (int i = 0; i < timedBuffs.Count; i++) { if (timedBuffs[i].buffIndex == buff.buffIndex && timedBuffs[i].timer < num) { num = timedBuffs[i].timer; num2 = i; } } if (num2 != -1 && num2 < timedBuffs.Count) { timedBuffs[num2].timer = duration; } } public static IEnumerator BroadcastChat(string token) { yield return (object)new WaitForSeconds(1f); Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = token }); } internal static string ScepterDescription(string desc) { return "\nSCEPTER: " + desc + ""; } } internal static class ArrayHelper { public static T[] Append(ref T[] array, List list) { int num = array.Length; int count = list.Count; Array.Resize(ref array, num + count); list.CopyTo(array, num); return array; } public static Func AppendDel(List list) { return (T[] r) => Append(ref r, list); } } public static class AttackerOverrideManager { public static Dictionary attackerToOverride = new Dictionary(); [SystemInitializer(new Type[] { })] private static void Init() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown HealthComponent.TakeDamage += new hook_TakeDamage(OverrideTakeDamage); GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(OverrideOnHitEnemy); GlobalEventManager.OnHitAll += new hook_OnHitAll(OverrideOnHitAll); } public static void AddOverride(GameObject self, GameObject overrider) { attackerToOverride.Add(self, overrider); } public static void RemoveOverride(GameObject self) { attackerToOverride.Remove(self); } private static void OverrideOnHitAll(orig_OnHitAll orig, GlobalEventManager self, DamageInfo damageInfo, GameObject hitObject) { if (attackerToOverride.Count > 0 && Object.op_Implicit((Object)(object)damageInfo.attacker) && attackerToOverride.TryGetValue(damageInfo.attacker, out var value)) { if (Object.op_Implicit((Object)(object)value)) { damageInfo.attacker = value; } else { SS2Log.Error(string.Concat("AttackerOverrideManager: ", damageInfo.attacker, " has an override but newAttacker is null!"), 41, "OverrideOnHitAll"); } } orig.Invoke(self, damageInfo, hitObject); } private static void OverrideOnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { if (attackerToOverride.Count > 0 && Object.op_Implicit((Object)(object)damageInfo.attacker) && attackerToOverride.TryGetValue(damageInfo.attacker, out var value)) { if (Object.op_Implicit((Object)(object)value)) { damageInfo.attacker = value; } else { SS2Log.Error(string.Concat("AttackerOverrideManager: ", damageInfo.attacker, " has an override but newAttacker is null!"), 55, "OverrideOnHitEnemy"); } } orig.Invoke(self, damageInfo, victim); } private static void OverrideTakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { if (attackerToOverride.Count > 0 && Object.op_Implicit((Object)(object)damageInfo.attacker) && attackerToOverride.TryGetValue(damageInfo.attacker, out var value)) { if (Object.op_Implicit((Object)(object)value)) { damageInfo.attacker = value; } else { SS2Log.Error(string.Concat("AttackerOverrideManager: ", damageInfo.attacker, " has an override but newAttacker is null!"), 69, "OverrideTakeDamage"); } } orig.Invoke(self, damageInfo); } } public class DetachParticlesOnDestroyAndEndEmission : MonoBehaviour { public ParticleSystem[] particleSystems; private void OnDisable() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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_001b: Unknown result type (might be due to invalid IL or missing references) ParticleSystem[] array = particleSystems; foreach (ParticleSystem obj in array) { MainModule main = obj.main; EmissionModule emission = obj.emission; ((MainModule)(ref main)).stopAction = (ParticleSystemStopAction)2; ((EmissionModule)(ref emission)).enabled = false; obj.Stop(); ((Component)obj).transform.SetParent((Transform)null); } } } public class NemSpawnPrefabBehavior : NetworkBehaviour { public int maxPurchaseCount = 1; public int purchaseCount; private float refreshTimer; private bool waitingForRefresh; [SerializeField] public PurchaseInteraction purchaseInteraction; public void Start() { Debug.Log((object)"starting nem spawn prefab behavior"); purchaseInteraction = ((Component)this).GetComponent(); ((UnityEvent)(object)purchaseInteraction.onPurchase).AddListener((UnityAction)Emerge); if ((Object)(object)purchaseInteraction == (Object)null) { Debug.Log((object)"pi null"); } else { Debug.Log((object)"pi set"); } } public void FixedUpdate() { if (waitingForRefresh) { refreshTimer -= Time.fixedDeltaTime; if (refreshTimer <= 0f && purchaseCount < maxPurchaseCount) { Debug.Log((object)"set to avaliable"); purchaseInteraction.SetAvailable(true); waitingForRefresh = false; } } } [Server] public void Emerge(Interactor interactor) { if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void Moonstorm.Starstorm2.NemSpawnPrefabBehavior::Emerge(RoR2.Interactor)' called on client"); return; } Debug.Log((object)"killing self"); if (NetworkServer.active) { purchaseInteraction.SetAvailable(false); waitingForRefresh = true; purchaseCount++; refreshTimer = 2f; Debug.Log((object)"i should be dead by now!!!"); } } private void UNetVersion() { } 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 TeleporterUpgradeController : NetworkBehaviour { [SyncVar(hook = "OnIsEtherealChanged")] public bool isEthereal; [SyncVar] private bool hasUpgraded; private HoldoutZoneController hzc; private TeleporterInteraction ti; private ParticleSystem telePassiveParticles; private ParticleSystem teleCenterParticles; private ParticleSystem lightningParticles; private Light lightningLightRef; private Renderer rangeIndicator; private ParticleSystem betweenProngsCore; private Light coreLightRef; private ParticleSystem debris; private ParticleSystem chargingRing; private Light loopLight; private ParticleSystem core; private ParticleSystem beam; private static int kCmdCmdUpdateIsEthereal; private static int kRpcRpcUpdateIsEthereal; public bool NetworkisEthereal { get { return isEthereal; } [param: In] set { ref bool reference = ref isEthereal; if (NetworkServer.localClientActive && !((NetworkBehaviour)this).syncVarHookGuard) { ((NetworkBehaviour)this).syncVarHookGuard = true; OnIsEtherealChanged(value); ((NetworkBehaviour)this).syncVarHookGuard = false; } ((NetworkBehaviour)this).SetSyncVar(value, ref reference, 1u); } } public bool NetworkhasUpgraded { get { return hasUpgraded; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref hasUpgraded, 2u); } } private void Awake() { Debug.Log((object)"TELEPORTER UPGRADE CONTROLLER AWAKE"); hzc = ((Component)this).GetComponent(); ti = ((Component)this).GetComponent(); telePassiveParticles = GameObject.Find("TeleporterBaseMesh/BuiltInEffects/PassiveParticle, Sphere").GetComponent(); teleCenterParticles = GameObject.Find("TeleporterBaseMesh/BuiltInEffects/PassiveParticle, Center").GetComponent(); lightningParticles = GameObject.Find("TeleporterBaseMesh/BuiltInEffects/ChargedEffect/LightningAlongProngs").GetComponent(); lightningLightRef = GameObject.Find("TeleporterBaseMesh/BuiltInEffects/ChargedEffect/LightningAlongProngs/ReferencePointLight").GetComponent(); betweenProngsCore = GameObject.Find("TeleporterBaseMesh/BuiltInEffects/IdleToChargingEffect/BetweenProngs/Core").GetComponent(); coreLightRef = GameObject.Find("TeleporterBaseMesh/BuiltInEffects/IdleToChargingEffect/BetweenProngs/Point light").GetComponent(); debris = GameObject.Find("TeleporterBaseMesh/BuiltInEffects/IdleToChargingEffect/3DDebris").GetComponent(); chargingRing = GameObject.Find("TeleporterBaseMesh/BuiltInEffects/ChargingEffect/Ring").GetComponent(); loopLight = GameObject.Find("TeleporterBaseMesh/BuiltInEffects/ChargingEffect/BetweenProngs/Loop/Point light").GetComponent(); core = GameObject.Find("TeleporterBaseMesh/BuiltInEffects/ChargingEffect/BetweenProngs/Loop/Core").GetComponent(); beam = GameObject.Find("TeleporterBaseMesh/BuiltInEffects/ChargingEffect/BetweenProngs/Loop/Beam").GetComponent(); rangeIndicator = hzc.radiusIndicator; } public void FixedUpdate() { if (isEthereal && !hasUpgraded) { NetworkhasUpgraded = true; UpgradeTeleporter(); } } [Command] public void CmdUpdateIsEthereal(bool value) { NetworkisEthereal = value; } [ClientRpc] public void RpcUpdateIsEthereal(bool value) { NetworkisEthereal = value; } private void OnIsEtherealChanged(bool value) { NetworkisEthereal = value; } public void UpgradeTeleporter() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: 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_0144: 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_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_017e: 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_0191: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: 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_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)"UPGRADING TELEPORTER"); Scene activeScene = SceneManager.GetActiveScene(); string name = ((Scene)(ref activeScene)).name; Ethereal.teleIsEthereal = true; HoldoutZoneController obj = hzc; obj.baseRadius *= 1.5f; HoldoutZoneController obj2 = hzc; obj2.baseChargeDuration *= 1.25f; CombatDirector bonusDirector = ti.bonusDirector; bonusDirector.maxConsecutiveCheapSkips = 2; bonusDirector.maximumNumberToSpawnBeforeSkipping = 10; Material val = SS2Assets.LoadAsset("matEtherealFresnelOverlay", SS2Bundle.Indev); GameObject gameObject = GameObject.Find("TeleporterBaseMesh").gameObject; GameObject gameObject2 = ((Component)gameObject.transform.Find("TeleporterProngMesh")).gameObject; GameObject gameObject3 = ((Component)gameObject.transform.Find("SurfaceHeight/TeleporterBeacon")).gameObject; _ = ((Component)((Component)gameObject.transform.Find("BuiltInEffects")).gameObject.transform.Find("ChargingEffect/RadiusScaler")).gameObject; if (name != "skymeadow") { ((Renderer)gameObject.GetComponent()).sharedMaterials[1].CopyPropertiesFromMaterial(val); ((Renderer)gameObject2.GetComponent()).sharedMaterials[1].CopyPropertiesFromMaterial(val); ((Renderer)gameObject3.GetComponent()).sharedMaterials[1].CopyPropertiesFromMaterial(val); } Transform transform = gameObject.transform; transform.localScale *= 1f; gameObject.transform.position = new Vector3(gameObject.transform.position.x, gameObject.transform.position.y, gameObject.transform.position.z); MainModule main = telePassiveParticles.main; Transform transform2 = ((Component)telePassiveParticles).transform; transform2.localScale *= 1.5f; ((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(new Color(0f, 0.89f, 0.39f)); MainModule main2 = teleCenterParticles.main; ((MainModule)(ref main2)).startColor = MinMaxGradient.op_Implicit(new Color(0f, 0.89f, 0.39f)); rangeIndicator.material = SS2Assets.LoadAsset("matEthTeleporterRangeIndicator", SS2Bundle.Indev); ((Renderer)((Component)lightningParticles).GetComponent()).material = SS2Assets.LoadAsset("matEthTPLightning", SS2Bundle.Indev); lightningLightRef.color = new Color(0f, 0.89f, 0.39f); ((Renderer)((Component)betweenProngsCore).GetComponent()).material = SS2Assets.LoadAsset("matEthTPFire", SS2Bundle.Indev); coreLightRef.color = new Color(0f, 0.89f, 0.39f); ((Component)debris).GetComponent().trailMaterial = SS2Assets.LoadAsset("matEthExplosion", SS2Bundle.Indev); ((Renderer)((Component)chargingRing).GetComponent()).material = SS2Assets.LoadAsset("matEthTPShockwave", SS2Bundle.Indev); loopLight.color = new Color(0f, 0.89f, 0.39f); ((Renderer)((Component)core).GetComponent()).material = SS2Assets.LoadAsset("matEthTPFire", SS2Bundle.Indev); ((Renderer)((Component)beam).GetComponent()).material = SS2Assets.LoadAsset("matEthTPLaser", SS2Bundle.Indev); } private void UNetVersion() { } protected static void InvokeCmdCmdUpdateIsEthereal(NetworkBehaviour obj, NetworkReader reader) { if (!NetworkServer.active) { Debug.LogError((object)"Command CmdUpdateIsEthereal called on client."); } else { ((TeleporterUpgradeController)(object)obj).CmdUpdateIsEthereal(reader.ReadBoolean()); } } public void CallCmdUpdateIsEthereal(bool value) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) if (!NetworkClient.active) { Debug.LogError((object)"Command function CmdUpdateIsEthereal called on server."); return; } if (((NetworkBehaviour)this).isServer) { CmdUpdateIsEthereal(value); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)5); val.WritePackedUInt32((uint)kCmdCmdUpdateIsEthereal); val.Write(((Component)this).GetComponent().netId); val.Write(value); ((NetworkBehaviour)this).SendCommandInternal(val, 0, "CmdUpdateIsEthereal"); } protected static void InvokeRpcRpcUpdateIsEthereal(NetworkBehaviour obj, NetworkReader reader) { if (!NetworkClient.active) { Debug.LogError((object)"RPC RpcUpdateIsEthereal called on server."); } else { ((TeleporterUpgradeController)(object)obj).RpcUpdateIsEthereal(reader.ReadBoolean()); } } public void CallRpcUpdateIsEthereal(bool value) { //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) if (!NetworkServer.active) { Debug.LogError((object)"RPC Function RpcUpdateIsEthereal called on client."); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)2); val.WritePackedUInt32((uint)kRpcRpcUpdateIsEthereal); val.Write(((Component)this).GetComponent().netId); val.Write(value); ((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcUpdateIsEthereal"); } static TeleporterUpgradeController() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown kCmdCmdUpdateIsEthereal = -1508966307; NetworkBehaviour.RegisterCommandDelegate(typeof(TeleporterUpgradeController), kCmdCmdUpdateIsEthereal, new CmdDelegate(InvokeCmdCmdUpdateIsEthereal)); kRpcRpcUpdateIsEthereal = -1879656397; NetworkBehaviour.RegisterRpcDelegate(typeof(TeleporterUpgradeController), kRpcRpcUpdateIsEthereal, new CmdDelegate(InvokeRpcRpcUpdateIsEthereal)); NetworkCRC.RegisterBehaviour("TeleporterUpgradeController", 0); } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.Write(isEthereal); writer.Write(hasUpgraded); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & (true ? 1u : 0u)) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(isEthereal); } if ((((NetworkBehaviour)this).syncVarDirtyBits & 2u) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(hasUpgraded); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { if (initialState) { isEthereal = reader.ReadBoolean(); hasUpgraded = reader.ReadBoolean(); return; } int num = (int)reader.ReadPackedUInt32(); if (((uint)num & (true ? 1u : 0u)) != 0) { OnIsEtherealChanged(reader.ReadBoolean()); } if (((uint)num & 2u) != 0) { hasUpgraded = reader.ReadBoolean(); } } public override void PreStartClient() { } } public abstract class BaseItemMasterBehavior : MonoBehaviour { private struct NetworkContextSet { public ItemTypePair[] itemTypePairs; public FixedSizeArrayPool behaviorArraysPool; public void SetItemTypePairs(List itemTypePairs) { this.itemTypePairs = itemTypePairs.ToArray(); behaviorArraysPool = new FixedSizeArrayPool(this.itemTypePairs.Length); } } [MeansImplicitUse] [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] public class ItemDefAssociationAttribute : SearchableAttribute { public Type behaviorTypeOverride; public bool useOnServer = true; public bool useOnClient = true; } public int stack; private static NetworkContextSet server; private static NetworkContextSet client; private static NetworkContextSet shared; private static CharacterMaster earlyAssignmentMaster = null; private static Dictionary, BaseItemMasterBehavior[]> masterToItemBehaviors = new Dictionary, BaseItemMasterBehavior[]>(); public CharacterMaster master { get; private set; } protected void Awake() { master = earlyAssignmentMaster; earlyAssignmentMaster = null; } [SystemInitializer(new Type[] { typeof(ItemCatalog) })] private static void Init() { //IL_045c: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Expected O, but got Unknown //IL_046d: Unknown result type (might be due to invalid IL or missing references) //IL_0477: Expected O, but got Unknown //IL_047e: Unknown result type (might be due to invalid IL or missing references) //IL_0488: Expected O, but got Unknown //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Expected O, but got Unknown //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Invalid comparison between Unknown and I4 //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0395: Unknown result type (might be due to invalid IL or missing references) //IL_039a: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0403: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) List list = new List(); List list2 = new List(); List list3 = new List(); List list4 = new List(); SearchableAttribute.GetInstances(list4); Type typeFromHandle = typeof(BaseItemMasterBehavior); Type typeFromHandle2 = typeof(ItemDef); foreach (ItemDefAssociationAttribute item in list4) { MethodInfo methodInfo; if ((methodInfo = ((SearchableAttribute)item).target as MethodInfo) == null) { SS2Log.Error("ItemDefAssociationAttribute cannot be applied to object of type '" + ((object)item)?.GetType().FullName + "'", 45, "Init"); continue; } if (!methodInfo.IsStatic) { SS2Log.Error("ItemDefAssociationAttribute cannot be applied to method " + methodInfo.DeclaringType.FullName + "." + methodInfo.Name + ": Method is not static.", 49, "Init"); continue; } Type type = item.behaviorTypeOverride ?? methodInfo.DeclaringType; if (!typeFromHandle.IsAssignableFrom(type)) { SS2Log.Error("ItemDefAssociationAttribute cannot be applied to method " + methodInfo.DeclaringType.FullName + "." + methodInfo.Name + ": " + methodInfo.DeclaringType.FullName + " does not derive from " + typeFromHandle.FullName + ".", 63, "Init"); continue; } if (type.IsAbstract) { SS2Log.Error("ItemDefAssociationAttribute cannot be applied to method " + methodInfo.DeclaringType.FullName + "." + methodInfo.Name + ": " + methodInfo.DeclaringType.FullName + " is an abstract type.", 78, "Init"); continue; } if (!typeFromHandle2.IsAssignableFrom(methodInfo.ReturnType)) { object[] array = new object[7] { "ItemDefAssociationAttribute", methodInfo.DeclaringType.FullName, methodInfo.Name, methodInfo.DeclaringType.FullName, methodInfo, null, null }; int num = 5; Type returnType = methodInfo.ReturnType; array[num] = ((returnType != null) ? returnType.FullName : null) ?? "void"; array[6] = typeFromHandle2.FullName; SS2Log.Error(string.Format("{0} cannot be applied to method {1}.{2}: {3}.{4} returns type '{5}' instead of {6}.", array), 102, "Init"); continue; } if (methodInfo.GetGenericArguments().Length != 0) { SS2Log.Error(string.Format("{0} cannot be applied to method {1}.{2}: {3}.{4} must take no arguments.", "ItemDefAssociationAttribute", methodInfo.DeclaringType.FullName, methodInfo.Name, methodInfo.DeclaringType.FullName, methodInfo), 106, "Init"); continue; } ItemDef val = (ItemDef)methodInfo.Invoke(null, Array.Empty()); if (!Object.op_Implicit((Object)(object)val)) { SS2Log.Error(methodInfo.DeclaringType.FullName + "." + methodInfo.Name + " returned null.", 120, "Init"); continue; } if ((int)val.itemIndex < 0) { SS2Log.Error($"{methodInfo.DeclaringType.FullName}.{methodInfo.Name} returned an ItemDef that's not registered in the ItemCatalog. result={val}", 124, "Init"); continue; } if (item.useOnServer) { list.Add(new ItemTypePair { itemIndex = val.itemIndex, behaviorType = type }); } if (item.useOnClient) { list2.Add(new ItemTypePair { itemIndex = val.itemIndex, behaviorType = type }); } if (item.useOnServer || item.useOnClient) { list3.Add(new ItemTypePair { itemIndex = val.itemIndex, behaviorType = type }); } } server.SetItemTypePairs(list); client.SetItemTypePairs(list2); shared.SetItemTypePairs(list3); CharacterMaster.Awake += new hook_Awake(CharacterMaster_Awake); CharacterMaster.OnDestroy += new hook_OnDestroy(CharacterMaster_OnDestroy); CharacterMaster.OnInventoryChanged += new hook_OnInventoryChanged(CharacterMaster_OnInventoryChanged); } private static void CharacterMaster_Awake(orig_Awake orig, CharacterMaster self) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) BaseItemMasterBehavior[] value = GetNetworkContext().behaviorArraysPool.Request(); masterToItemBehaviors.Add(UnityObjectWrapperKey.op_Implicit(self), value); orig.Invoke(self); } private static void CharacterMaster_OnDestroy(orig_OnDestroy orig, CharacterMaster self) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); BaseItemMasterBehavior[] array = masterToItemBehaviors[UnityObjectWrapperKey.op_Implicit(self)]; for (int i = 0; i < array.Length; i++) { Object.Destroy((Object)(object)array[i]); } masterToItemBehaviors.Remove(UnityObjectWrapperKey.op_Implicit(self)); if (NetworkServer.active || NetworkClient.active) { GetNetworkContext().behaviorArraysPool.Return(array); } } private static void CharacterMaster_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterMaster self) { orig.Invoke(self); UpdateMasterItemBehaviorStacks(self); } private static ref NetworkContextSet GetNetworkContext() { bool active = NetworkServer.active; bool active2 = NetworkClient.active; if (active) { if (active2) { return ref shared; } return ref server; } if (active2) { return ref client; } throw new InvalidOperationException("Neither server nor client is running."); } private static void UpdateMasterItemBehaviorStacks(CharacterMaster master) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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) //IL_0057: Unknown result type (might be due to invalid IL or missing references) ref NetworkContextSet networkContext = ref GetNetworkContext(); if (!masterToItemBehaviors.TryGetValue(UnityObjectWrapperKey.op_Implicit(master), out var value)) { return; } ItemTypePair[] itemTypePairs = networkContext.itemTypePairs; Inventory inventory = master.inventory; if (Object.op_Implicit((Object)(object)inventory)) { for (int i = 0; i < itemTypePairs.Length; i++) { ItemTypePair val = itemTypePairs[i]; SetItemStack(master, ref value[i], val.behaviorType, inventory.GetItemCount(val.itemIndex)); } return; } for (int j = 0; j < itemTypePairs.Length; j++) { ref BaseItemMasterBehavior reference = ref value[j]; if ((Object)(object)reference != (Object)null) { Object.Destroy((Object)(object)reference); reference = null; } } } private static void SetItemStack(CharacterMaster master, ref BaseItemMasterBehavior behavior, Type behaviorType, int stack) { if ((Object)(object)behavior == (Object)null != stack <= 0) { if (stack <= 0) { behavior.stack = 0; Object.Destroy((Object)(object)behavior); behavior = null; } else { earlyAssignmentMaster = master; behavior = (BaseItemMasterBehavior)(object)((Component)master).gameObject.AddComponent(behaviorType); earlyAssignmentMaster = null; } } if ((Object)(object)behavior != (Object)null) { behavior.stack = stack; } } } internal class Bulwark { public static bool swordBulwark; internal static void Init() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown ArtifactTrialMissionController.OnCurrentArtifactDiscovered += new hook_OnCurrentArtifactDiscovered(OverwriteArtifact); } private static void SceneDirector_Start(orig_Start orig, SceneDirector self) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); if (((Scene)(ref activeScene)).name == "artifactworld" && swordBulwark && NetworkServer.active) { Debug.Log((object)"cool sword!"); } } private static void OverwriteArtifact(orig_OnCurrentArtifactDiscovered orig, ArtifactTrialMissionController self, ArtifactDef artifactDef) { //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) orig.Invoke(self, artifactDef); if (Object.op_Implicit((Object)(object)self.artifactPickup) && swordBulwark) { if (!self.artifactWasEnabled) { RunArtifactManager.instance.SetArtifactEnabledServer(artifactDef, false); } self.artifactPickup.NetworkpickupIndex = PickupCatalog.FindPickupIndex(SS2Content.Equipments.equipDivineRight.equipmentIndex); } } } public static class Cyclone { private static int defMonsterCap; private static RuleChoiceDef rcd; public static SerializableDifficultyDef CycloneDef { get; private set; } public static DifficultyIndex CycloneIndex => CycloneDef.DifficultyIndex; internal static void Init() { CycloneDef = SS2Assets.LoadAsset("Cyclone", SS2Bundle.Base); DifficultyAPI.AddDifficulty(CycloneDef); Run.onRunDestroyGlobal += Run_onRunDestroyGlobal; Run.onRunStartGlobal += Run_onRunStartGlobal; } private static void Run_onRunStartGlobal(Run run) { defMonsterCap = TeamCatalog.GetTeamDef((TeamIndex)2).softCharacterLimit; } private static void Run_onRunDestroyGlobal(Run run) { TeamCatalog.GetTeamDef((TeamIndex)2).softCharacterLimit = defMonsterCap; TeamCatalog.GetTeamDef((TeamIndex)4).softCharacterLimit = defMonsterCap; TeamCatalog.GetTeamDef((TeamIndex)3).softCharacterLimit = defMonsterCap; } } public static class Deluge { private static int defMonsterCap; private static RuleChoiceDef rcd; public static SerializableDifficultyDef DelugeDef { get; private set; } public static DifficultyIndex DelugeIndex => DelugeDef.DifficultyIndex; internal static void Init() { DelugeDef = SS2Assets.LoadAsset("Deluge", SS2Bundle.Base); DifficultyAPI.AddDifficulty(DelugeDef); Run.onRunDestroyGlobal += Run_onRunDestroyGlobal; Run.onRunStartGlobal += Run_onRunStartGlobal; } private static void Run_onRunStartGlobal(Run run) { defMonsterCap = TeamCatalog.GetTeamDef((TeamIndex)2).softCharacterLimit; } private static void Run_onRunDestroyGlobal(Run run) { TeamCatalog.GetTeamDef((TeamIndex)2).softCharacterLimit = defMonsterCap; TeamCatalog.GetTeamDef((TeamIndex)4).softCharacterLimit = defMonsterCap; TeamCatalog.GetTeamDef((TeamIndex)3).softCharacterLimit = defMonsterCap; } } public static class SuperTyphoon { private static int defMonsterCap; [RooConfigurableField("SS2.Main", ConfigSection = "Super Typhoon", ConfigName = "Increase Team Limit", ConfigDesc = "Multiplies the Monster, Lunar, and Void Team maximum size by 3 when enabled. May affect performance.")] internal static bool IncreaseSpawnCapST = true; private static RuleChoiceDef rcd; public static SerializableDifficultyDef SuperTyphoonDef { get; private set; } public static DifficultyIndex SuperTyphoonIndex => SuperTyphoonDef.DifficultyIndex; internal static void Init() { SuperTyphoonDef = SS2Assets.LoadAsset("SuperTyphoon", SS2Bundle.Base); DifficultyAPI.AddDifficulty(SuperTyphoonDef); Run.onRunStartGlobal += Run_onRunStartGlobal; Run.onRunDestroyGlobal += Run_onRunDestroyGlobal; } private static void Run_onRunStartGlobal(Run run) { //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_004d: Unknown result type (might be due to invalid IL or missing references) defMonsterCap = TeamCatalog.GetTeamDef((TeamIndex)2).softCharacterLimit; if (run.selectedDifficulty != SuperTyphoonIndex) { return; } foreach (CharacterMaster value in run.userMasters.Values) { if (NetworkServer.active) { value.inventory.GiveItem(Items.MonsoonPlayerHelper.itemIndex, 1); } } if (IncreaseSpawnCapST) { TeamDef teamDef = TeamCatalog.GetTeamDef((TeamIndex)2); teamDef.softCharacterLimit *= 3; TeamDef teamDef2 = TeamCatalog.GetTeamDef((TeamIndex)4); teamDef2.softCharacterLimit *= 3; TeamDef teamDef3 = TeamCatalog.GetTeamDef((TeamIndex)3); teamDef3.softCharacterLimit *= 3; } } private static void Run_onRunDestroyGlobal(Run run) { TeamCatalog.GetTeamDef((TeamIndex)2).softCharacterLimit = defMonsterCap; TeamCatalog.GetTeamDef((TeamIndex)4).softCharacterLimit = defMonsterCap; TeamCatalog.GetTeamDef((TeamIndex)3).softCharacterLimit = defMonsterCap; } } public static class Tempest { private static int defMonsterCap; private static RuleChoiceDef rcd; public static SerializableDifficultyDef TempestDef { get; private set; } public static DifficultyIndex TempestIndex => TempestDef.DifficultyIndex; internal static void Init() { TempestDef = SS2Assets.LoadAsset("Tempest", SS2Bundle.Base); DifficultyAPI.AddDifficulty(TempestDef); Run.onRunDestroyGlobal += Run_onRunDestroyGlobal; Run.onRunStartGlobal += Run_onRunStartGlobal; } private static void Run_onRunStartGlobal(Run run) { defMonsterCap = TeamCatalog.GetTeamDef((TeamIndex)2).softCharacterLimit; } private static void Run_onRunDestroyGlobal(Run run) { TeamCatalog.GetTeamDef((TeamIndex)2).softCharacterLimit = defMonsterCap; TeamCatalog.GetTeamDef((TeamIndex)4).softCharacterLimit = defMonsterCap; TeamCatalog.GetTeamDef((TeamIndex)3).softCharacterLimit = defMonsterCap; } } public static class Typhoon { private static int defMonsterCap; [RooConfigurableField("SS2.Main", ConfigSection = "Typhoon", ConfigName = "Increase Team Limit", ConfigDesc = "Multiplies the Monster, Lunar, and Void Team maximum size by 2 when enabled. May affect performance.")] internal static bool IncreaseSpawnCap = true; public static SerializableDifficultyDef TyphoonDef { get; private set; } public static DifficultyIndex TyphoonIndex => TyphoonDef.DifficultyIndex; internal static void Init() { TyphoonDef = SS2Assets.LoadAsset("Typhoon", SS2Bundle.Base); DifficultyAPI.AddDifficulty(TyphoonDef); Run.onRunStartGlobal += Run_onRunStartGlobal; Run.onRunDestroyGlobal += Run_onRunDestroyGlobal; } public static void CombatDirector_Awake(orig_Awake orig, CombatDirector self) { if (IncreaseSpawnCap) { self.creditMultiplier *= 1.25f; self.expRewardCoefficient *= 0.8f; self.goldRewardCoefficient *= 0.8f; } orig.Invoke(self); } private static void Run_onRunStartGlobal(Run run) { //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_004d: 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_00c2: Expected O, but got Unknown defMonsterCap = TeamCatalog.GetTeamDef((TeamIndex)2).softCharacterLimit; if (run.selectedDifficulty != TyphoonIndex) { return; } foreach (CharacterMaster value in run.userMasters.Values) { if (NetworkServer.active) { value.inventory.GiveItem(Items.MonsoonPlayerHelper.itemIndex, 1); } } if (IncreaseSpawnCap) { TeamDef teamDef = TeamCatalog.GetTeamDef((TeamIndex)2); teamDef.softCharacterLimit *= 2; TeamDef teamDef2 = TeamCatalog.GetTeamDef((TeamIndex)4); teamDef2.softCharacterLimit *= 2; TeamDef teamDef3 = TeamCatalog.GetTeamDef((TeamIndex)3); teamDef3.softCharacterLimit *= 2; CombatDirector.Awake += new hook_Awake(CombatDirector_Awake); } } private static void Run_onRunDestroyGlobal(Run run) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown TeamCatalog.GetTeamDef((TeamIndex)2).softCharacterLimit = defMonsterCap; TeamCatalog.GetTeamDef((TeamIndex)4).softCharacterLimit = defMonsterCap; TeamCatalog.GetTeamDef((TeamIndex)3).softCharacterLimit = defMonsterCap; if (IncreaseSpawnCap) { CombatDirector.Awake -= new hook_Awake(CombatDirector_Awake); } } } public class Ethereal : NetworkBehaviour { public static Color32 ethColor = new Color32((byte)18, (byte)93, (byte)74, byte.MaxValue); public static bool teleIsEthereal; private static float storedScalingValue; public static GameObject shrinePrefab; public static GameObject portalPrefab; public static bool teleUpgraded; public static bool adversityEnabled; private static int storedLevelCap; private Xoroshiro128Plus rng; public static Ethereal instance { get; private set; } public static int etherealsCompleted { get; private set; } internal static void Init() { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown TraderController.Initialize(); Deluge.Init(); Tempest.Init(); Cyclone.Init(); SuperTyphoon.Init(); storedLevelCap = Run.ambientLevelCap; Debug.Log((object)"Initializing Ethereal Sapling prefab..."); shrinePrefab = PrefabAPI.InstantiateClone(SS2Assets.LoadAsset("ShrineEthereal", SS2Bundle.Indev), "EtherealSapling", true); PrefabAPI.RegisterNetworkPrefab(shrinePrefab); portalPrefab = PrefabAPI.InstantiateClone(SS2Assets.LoadAsset("PortalStranger1", SS2Bundle.Stages), "StrangerPortal", true); PrefabAPI.RegisterNetworkPrefab(portalPrefab); Addressables.LoadAssetAsync((object)"RoR2/Base/Teleporters/Teleporter1.prefab").WaitForCompletion().AddComponent(); Addressables.LoadAssetAsync((object)"RoR2/Base/Teleporters/LunarTeleporter Variant.prefab").WaitForCompletion().AddComponent(); Run.onRunStartGlobal += Run_onRunStartGlobal; Run.onRunDestroyGlobal += Run_onRunDestroyGlobal; TeleporterInteraction.onTeleporterBeginChargingGlobal += TeleporterInteraction_onTeleporterBeginChargingGlobal; TeleporterInteraction.onTeleporterChargedGlobal += TeleporterInteraction_onTeleporterChargedGlobal; TeleporterInteraction.Start += new hook_Start(TeleporterInteraction_Start); SceneDirector.Start += new hook_Start(SceneDirector_Start); } private static void Run_onRunStartGlobal(Run run) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) etherealsCompleted = 0; storedScalingValue = DifficultyCatalog.GetDifficultyDef(run.selectedDifficulty).scalingValue; teleIsEthereal = false; Run.ambientLevelCap = storedLevelCap; Debug.Log((object)("completed: " + etherealsCompleted + "; teleIsEthereal: " + teleIsEthereal.ToString())); } private static void Run_onRunDestroyGlobal(Run run) { //IL_0001: 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) DifficultyCatalog.GetDifficultyDef(run.selectedDifficulty).scalingValue = storedScalingValue; Debug.Log((object)(DifficultyCatalog.GetDifficultyDef(run.selectedDifficulty).scalingValue + " - scaling value")); Debug.Log((object)("completed ethereals: " + etherealsCompleted + "; teleIsEthereal: " + teleIsEthereal.ToString())); } public static void SceneDirector_Start(orig_Start orig, SceneDirector self) { //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_007b: 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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_04f1: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: Unknown result type (might be due to invalid IL or missing references) //IL_039a: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_045e: Unknown result type (might be due to invalid IL or missing references) //IL_0463: Unknown result type (might be due to invalid IL or missing references) //IL_0584: Unknown result type (might be due to invalid IL or missing references) //IL_0589: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_05e3: Unknown result type (might be due to invalid IL or missing references) //IL_05e8: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_061d: Unknown result type (might be due to invalid IL or missing references) //IL_0632: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_0558: Unknown result type (might be due to invalid IL or missing references) //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_0432: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_05b5: Unknown result type (might be due to invalid IL or missing references) //IL_05ba: Unknown result type (might be due to invalid IL or missing references) //IL_048f: Unknown result type (might be due to invalid IL or missing references) //IL_0494: Unknown result type (might be due to invalid IL or missing references) //IL_0522: Unknown result type (might be due to invalid IL or missing references) //IL_0527: Unknown result type (might be due to invalid IL or missing references) //IL_0611: Unknown result type (might be due to invalid IL or missing references) //IL_0616: Unknown result type (might be due to invalid IL or missing references) //IL_0695: Unknown result type (might be due to invalid IL or missing references) //IL_06a6: Unknown result type (might be due to invalid IL or missing references) //IL_0663: Unknown result type (might be due to invalid IL or missing references) //IL_0664: Unknown result type (might be due to invalid IL or missing references) //IL_080a: Unknown result type (might be due to invalid IL or missing references) //IL_0869: Unknown result type (might be due to invalid IL or missing references) //IL_0b01: Unknown result type (might be due to invalid IL or missing references) //IL_0921: Unknown result type (might be due to invalid IL or missing references) //IL_0926: Unknown result type (might be due to invalid IL or missing references) //IL_092d: Unknown result type (might be due to invalid IL or missing references) //IL_095d: Unknown result type (might be due to invalid IL or missing references) //IL_0962: Unknown result type (might be due to invalid IL or missing references) //IL_0964: Unknown result type (might be due to invalid IL or missing references) //IL_0977: Expected I4, but got Unknown //IL_0ab3: Unknown result type (might be due to invalid IL or missing references) //IL_0ab8: Unknown result type (might be due to invalid IL or missing references) //IL_0ac6: Unknown result type (might be due to invalid IL or missing references) //IL_097e: Unknown result type (might be due to invalid IL or missing references) //IL_09c3: Unknown result type (might be due to invalid IL or missing references) //IL_0a05: Unknown result type (might be due to invalid IL or missing references) //IL_0a45: Unknown result type (might be due to invalid IL or missing references) //IL_0a4a: Unknown result type (might be due to invalid IL or missing references) //IL_0a53: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); Scene activeScene = SceneManager.GetActiveScene(); string name = ((Scene)(ref activeScene)).name; if (Object.op_Implicit((Object)(object)self.teleporterInstance)) { TeleporterUpgradeController component = self.teleporterInstance.GetComponent(); if ((Object)(object)component != (Object)null && ((!(name == "skymeadow") && !(name == "slumberingsatellite")) || !adversityEnabled)) { component.NetworkisEthereal = false; } Debug.Log((object)("Adversity : " + adversityEnabled)); Vector3 zero = Vector3.zero; Quaternion val = Quaternion.Euler(-90f, 0f, 0f); switch (name) { case "blackbeach": ((Vector3)(ref zero))..ctor(-60f, -51.2f, -231f); val = Quaternion.Euler(0f, 0f, 0f); break; case "blackbeach2": ((Vector3)(ref zero))..ctor(-101.4f, 1.5f, 20.1f); val = Quaternion.Euler(0f, 292.8f, 0f); break; case "golemplains": ((Vector3)(ref zero))..ctor(283.7f, -50f, -154.7f); val = Quaternion.Euler(0f, 321f, 0f); break; case "golemplains2": ((Vector3)(ref zero))..ctor(9.8f, 127.5f, -251.8f); val = Quaternion.Euler(0f, 5f, 0f); break; case "goolake": ((Vector3)(ref zero))..ctor(53.9f, -45.9f, -219.6f); val = Quaternion.Euler(0f, 190f, 0f); break; case "foggyswamp": ((Vector3)(ref zero))..ctor(-83.74f, -83.35f, 39.09f); val = Quaternion.Euler(0f, 104.27f, 0f); break; case "frozenwall": ((Vector3)(ref zero))..ctor(-230.7f, 132f, 239.4f); val = Quaternion.Euler(0f, 167f, 0f); break; case "wispgraveyard": ((Vector3)(ref zero))..ctor(-341.5f, 79f, 0.5f); val = Quaternion.Euler(0f, 145f, 0f); break; case "dampcavesimple": ((Vector3)(ref zero))..ctor(157.5f, -43.1f, -188.9f); val = Quaternion.Euler(0f, 318.4f, 0f); break; case "shipgraveyard": ((Vector3)(ref zero))..ctor(20.5f, -23.7f, 185.1f); val = Quaternion.Euler(0f, 173.6f, 0f); break; case "rootjungle": ((Vector3)(ref zero))..ctor(-196.6f, 190.1f, -204.5f); val = Quaternion.Euler(0f, 80f, 0f); break; case "snowyforest": ((Vector3)(ref zero))..ctor(-38.7f, 112.7f, 153.1f); val = Quaternion.Euler(0f, 54.1f, 0f); break; case "ancientloft": ((Vector3)(ref zero))..ctor(-133.4f, 33.5f, -280f); val = Quaternion.Euler(0f, 354.5f, 0f); break; case "sulfurpools": ((Vector3)(ref zero))..ctor(-33.6f, 36.8f, 164.1f); val = Quaternion.Euler(0f, 187f, 0f); break; case "FBLScene": ((Vector3)(ref zero))..ctor(58.3f, 372f, -88.8f); val = Quaternion.Euler(0f, 0f, 0f); break; case "drybasin": ((Vector3)(ref zero))..ctor(149.4f, 65.7f, -212.7f); val = Quaternion.Euler(0f, 0f, 0f); break; } Debug.Log((object)("POS : " + zero)); Debug.Log((object)("ROT : " + val)); Debug.Log((object)("SHRINEPREFAB : " + shrinePrefab)); if (NetworkServer.active) { GameObject val2 = Object.Instantiate(shrinePrefab, zero, val); NetworkServer.Spawn(val2); Debug.Log((object)("TERM : " + val2)); } Debug.Log((object)string.Concat("placed shrine at: ", zero, "pos & ", val, "rot")); } Debug.Log((object)("completed ethereals: " + etherealsCompleted + "; teleIsEthereal: " + teleIsEthereal.ToString())); if (teleIsEthereal && name != "artifactworld" && name != "arena" && name != "artifactworld" && name != "forgottenhaven") { ChatMessage.Send("SS2_ETHEREAL_DIFFICULTY_WARNING"); teleIsEthereal = false; etherealsCompleted++; Run val3 = Run.instance; if (!NetworkServer.active || !Object.op_Implicit((Object)(object)val3)) { return; } DifficultyDef difficultyDef = DifficultyCatalog.GetDifficultyDef(val3.selectedDifficulty); float scalingValue = difficultyDef.scalingValue; if (!1f.Equals(scalingValue)) { if (!2f.Equals(scalingValue)) { if (3f.Equals(scalingValue)) { TeamDef teamDef = TeamCatalog.GetTeamDef((TeamIndex)2); teamDef.softCharacterLimit *= 2; TeamDef teamDef2 = TeamCatalog.GetTeamDef((TeamIndex)4); teamDef2.softCharacterLimit *= 2; TeamDef teamDef3 = TeamCatalog.GetTeamDef((TeamIndex)3); teamDef3.softCharacterLimit *= 2; } } else { foreach (CharacterMaster value in val3.userMasters.Values) { if (Object.op_Implicit((Object)(object)value.inventory)) { value.inventory.GiveItem(Items.MonsoonPlayerHelper.itemIndex, 1); } } } } else { foreach (CharacterMaster value2 in val3.userMasters.Values) { if (Object.op_Implicit((Object)(object)value2.inventory)) { value2.inventory.RemoveItem(Items.DrizzlePlayerHelper.itemIndex, 1); } } } if (difficultyDef.scalingValue < 3f) { difficultyDef.scalingValue += 1f; } else { difficultyDef.scalingValue += 0.5f; } Run.ambientLevelCap += 100; if (NetworkServer.active) { val3.RecalculateDifficultyCoefficent(); DifficultyIndex val4 = val3.ruleBook.FindDifficulty(); Debug.Log((object)("og difficulty diff: " + DifficultyCatalog.GetDifficultyDef(val4).nameToken)); for (int i = 0; i < val3.ruleBook.ruleValues.Length; i++) { RuleChoiceDef ruleChoice = val3.ruleBook.GetRuleChoice(i); DifficultyIndex difficultyIndex = ruleChoice.difficultyIndex; switch ((int)difficultyIndex) { case 0: val3.selectedDifficulty = Deluge.DelugeIndex; Debug.Log((object)"drizzle detected; trying to override"); val3.ruleBook.ApplyChoice(RuleCatalog.FindChoiceDef("Difficulty." + Language.GetString(Deluge.DelugeDef.nameToken))); break; case 1: val3.selectedDifficulty = Tempest.TempestIndex; Debug.Log((object)"rainstorm detected; trying to override"); val3.ruleBook.ApplyChoice(RuleCatalog.FindChoiceDef("Difficulty." + Language.GetString(Tempest.TempestDef.nameToken))); break; case 2: val3.selectedDifficulty = Cyclone.CycloneIndex; Debug.Log((object)"monsoon detected; trying to override"); val3.ruleBook.ApplyChoice(RuleCatalog.FindChoiceDef("Difficulty." + Language.GetString(Cyclone.CycloneDef.nameToken))); break; } if (ruleChoice.difficultyIndex == Typhoon.TyphoonIndex) { val3.selectedDifficulty = SuperTyphoon.SuperTyphoonIndex; Debug.Log((object)"typhoon detected; trying to override"); val3.ruleBook.ApplyChoice(RuleCatalog.FindChoiceDef("Difficulty." + Language.GetString(SuperTyphoon.SuperTyphoonDef.nameToken))); } } val4 = val3.ruleBook.FindDifficulty(); val3.RecalculateDifficultyCoefficent(); Debug.Log((object)("hopefully updated diff: " + DifficultyCatalog.GetDifficultyDef(val4).nameToken)); Debug.Log((object)(val3.difficultyCoefficient + " - run difficulty coef")); } _ = difficultyDef.nameToken; Debug.Log((object)(DifficultyCatalog.GetDifficultyDef(val3.selectedDifficulty).scalingValue + " - current scaling value")); Debug.Log((object)("ethereals completed: " + etherealsCompleted + "; teleIsEthereal: " + teleIsEthereal.ToString())); } else { teleIsEthereal = false; } } private static void TeleporterInteraction_Start(orig_Start orig, TeleporterInteraction self) { Debug.Log((object)"setting tp back"); Material val = SS2Assets.LoadAsset("matEtherealFresnelOverlayOG", SS2Bundle.Indev); GameObject gameObject = ((Component)((Component)self).gameObject.transform.Find("TeleporterBaseMesh")).gameObject; GameObject gameObject2 = ((Component)gameObject.transform.Find("TeleporterProngMesh")).gameObject; GameObject gameObject3 = ((Component)gameObject.transform.Find("SurfaceHeight").Find("TeleporterBeacon")).gameObject; ((Renderer)gameObject.GetComponent()).sharedMaterials[1].CopyPropertiesFromMaterial(val); ((Renderer)gameObject2.GetComponent()).sharedMaterials[1].CopyPropertiesFromMaterial(val); ((Renderer)gameObject3.GetComponent()).sharedMaterials[1].CopyPropertiesFromMaterial(val); orig.Invoke(self); } private static void TeleporterInteraction_onTeleporterBeginChargingGlobal(TeleporterInteraction tele) { if (teleIsEthereal && NetworkServer.active) { Debug.Log((object)("ethereals completed: " + etherealsCompleted + "; teleIsEthereal: " + teleIsEthereal.ToString())); if (Object.op_Implicit((Object)(object)tele.bossDirector)) { CombatDirector bossDirector = tele.bossDirector; bossDirector.monsterCredit += (float)(int)(300f * Mathf.Pow(Run.instance.compensatedDifficultyCoefficient, 0.5f)); Debug.Log((object)"added to monstercred"); } if (Object.op_Implicit((Object)(object)tele.bonusDirector)) { CombatDirector bonusDirector = tele.bonusDirector; bonusDirector.monsterCredit += (float)(int)(200f * Mathf.Pow(Run.instance.compensatedDifficultyCoefficient, 0.5f)); Debug.Log((object)"added to bonus monstercred"); } } } private static void HoldoutZoneController_calcRadius(ref float radius) { if (teleIsEthereal) { radius *= 1.5f; } } private static void TeleporterInteraction_onTeleporterChargedGlobal(TeleporterInteraction obj) { //IL_0028: 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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0554: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_05b4: Unknown result type (might be due to invalid IL or missing references) //IL_05b9: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Unknown result type (might be due to invalid IL or missing references) //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_05e1: Unknown result type (might be due to invalid IL or missing references) //IL_05e6: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0619: Unknown result type (might be due to invalid IL or missing references) //IL_062e: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_0658: Unknown result type (might be due to invalid IL or missing references) //IL_0685: Unknown result type (might be due to invalid IL or missing references) //IL_0696: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0434: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_0584: Unknown result type (might be due to invalid IL or missing references) //IL_0589: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_060e: Unknown result type (might be due to invalid IL or missing references) //IL_0613: Unknown result type (might be due to invalid IL or missing references) //IL_0494: Unknown result type (might be due to invalid IL or missing references) //IL_0499: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)"tele finished"); if (teleIsEthereal && NetworkServer.active) { Debug.Log((object)"spawning portal"); Scene activeScene = SceneManager.GetActiveScene(); string name = ((Scene)(ref activeScene)).name; Vector3 zero = Vector3.zero; Quaternion val = Quaternion.Euler(-90f, 0f, 0f); switch (name) { case "blackbeach": ((Vector3)(ref zero))..ctor(-60f, -47.2f, -231f); val = Quaternion.Euler(0f, 0f, 0f); break; case "blackbeach2": ((Vector3)(ref zero))..ctor(-101.4f, 5.5f, 20.1f); val = Quaternion.Euler(0f, 292.8f, 0f); break; case "golemplains": ((Vector3)(ref zero))..ctor(283.7f, -46f, -154.7f); val = Quaternion.Euler(0f, 321f, 0f); break; case "golemplains2": ((Vector3)(ref zero))..ctor(9.8f, 131.5f, -251.8f); val = Quaternion.Euler(0f, 5f, 0f); break; case "goolake": ((Vector3)(ref zero))..ctor(53.9f, -41.9f, -219.6f); val = Quaternion.Euler(0f, 190f, 0f); break; case "foggyswamp": ((Vector3)(ref zero))..ctor(-83.74f, -79.8f, 39.09f); val = Quaternion.Euler(0f, 104.27f, 0f); break; case "frozenwall": ((Vector3)(ref zero))..ctor(-230.7f, 136f, 239.4f); val = Quaternion.Euler(0f, 167f, 0f); break; case "wispgraveyard": ((Vector3)(ref zero))..ctor(-341.5f, 83f, 0.5f); val = Quaternion.Euler(0f, 145f, 0f); break; case "dampcavesimple": ((Vector3)(ref zero))..ctor(157.5f, -39.1f, -188.9f); val = Quaternion.Euler(0f, 318.4f, 0f); break; case "shipgraveyard": ((Vector3)(ref zero))..ctor(20.5f, -19.7f, 185.1f); val = Quaternion.Euler(0f, 173.6f, 0f); break; case "rootjungle": ((Vector3)(ref zero))..ctor(-196.6f, 190.1f, -204.5f); val = Quaternion.Euler(0f, 80f, 0f); break; case "skymeadow": ((Vector3)(ref zero))..ctor(65.9f, 127.4f, -293.9f); val = Quaternion.Euler(0f, 194.8f, 0f); break; case "snowyforest": ((Vector3)(ref zero))..ctor(-38.7f, 116.7f, 153.1f); val = Quaternion.Euler(0f, 54.1f, 0f); break; case "ancientloft": ((Vector3)(ref zero))..ctor(-133.4f, 37.5f, -280f); val = Quaternion.Euler(0f, 354.5f, 0f); break; case "sulfurpools": ((Vector3)(ref zero))..ctor(-33.6f, 40.8f, 164.1f); val = Quaternion.Euler(0f, 187f, 0f); break; case "FBLScene": ((Vector3)(ref zero))..ctor(58.3f, 376f, -88.8f); val = Quaternion.Euler(0f, 0f, 0f); break; case "drybasin": ((Vector3)(ref zero))..ctor(149.4f, 69.7f, -212.7f); val = Quaternion.Euler(0f, 0f, 0f); break; } Debug.Log((object)("POS : " + zero)); Debug.Log((object)("ROT : " + val)); Debug.Log((object)("PORTALPREFAB : " + portalPrefab)); GameObject val2 = Object.Instantiate(portalPrefab, zero, val); NetworkServer.Spawn(val2); Debug.Log((object)("TERM : " + val2)); Debug.Log((object)string.Concat("placed portal at: ", zero, "pos & ", val, "rot")); } } private void UNetVersion() { } 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 static class Events { public static class NemesisHelpers { public static NemesisInventory NemmandoInventory => SS2Assets.LoadAsset("NemmandoInventory", SS2Bundle.Events); public static EventCard NemmandoEventCard => SS2Assets.LoadAsset("NemmandoBoss", SS2Bundle.Events); public static NemesisSpawnCard NemmandoSpawnCard => SS2Assets.LoadAsset("nscNemmandoBoss", SS2Bundle.Events); public static EventCard CreateEventCardFromTemplate(string assetName) { //IL_0017: 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) EventCard obj = Object.Instantiate(NemmandoEventCard); ((Object)obj).name = assetName; obj.eventState = default(SerializableEntityStateType); obj.messageColor = Color.white; obj.requiredExpansions.Clear(); return obj; } public static NemesisSpawnCard CreateNemesisSpawnCardFromTemplate(string assetName) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) NemesisSpawnCard nemesisSpawnCard = Object.Instantiate(NemmandoSpawnCard); ((Object)nemesisSpawnCard).name = assetName; ((SpawnCard)nemesisSpawnCard).prefab = null; nemesisSpawnCard.nemesisInventory = null; nemesisSpawnCard.useOverrideState = false; nemesisSpawnCard.overrideSpawnState = default(SerializableEntityStateType); nemesisSpawnCard.skillOverrides = Array.Empty(); nemesisSpawnCard.visualEffect = null; nemesisSpawnCard.childName = string.Empty; nemesisSpawnCard.itemDef = null; return nemesisSpawnCard; } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static IsDisabledDelegate <>9__2_2; public static OnConfigChangedDelegate <>9__2_3; public static Action <>9__2_0; internal bool b__2_2() { return !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableEvents); } internal void b__2_0(ConfigurableBool b) { ((ConfigurableVariable)b).Section = "Visuals"; ((ConfigurableVariable)b).Key = "Custom Main Menu"; ((ConfigurableVariable)b).Description = "Setting this to false returns the main menu to the original, bright one."; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigMisc; ((ConfigurableVariable)(object)b).OnConfigChanged += delegate(bool b1) { if (b1) { SceneManager.sceneLoaded -= StormOnMenu; SceneManager.sceneLoaded += StormOnMenu; } else { SceneManager.sceneLoaded -= StormOnMenu; } }; } internal void b__2_3(bool b1) { if (b1) { SceneManager.sceneLoaded -= StormOnMenu; SceneManager.sceneLoaded += StormOnMenu; } else { SceneManager.sceneLoaded -= StormOnMenu; } } internal void <.cctor>b__4_0(ConfigurableBool b) { //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_003e: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Events"; ((ConfigurableVariable)b).Key = "Enable Events"; ((ConfigurableVariable)b).Description = "Enables Starstorm 2's random events, including storms. Set to false to disable events."; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigMain; b.CheckBoxConfig = new CheckBoxConfig { restartRequired = true }; } } public static ConfigurableBool EnableEvents = ConfigLoader.MakeConfigurableBool(true, (Action)delegate(ConfigurableBool b) { //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_003e: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Events"; ((ConfigurableVariable)b).Key = "Enable Events"; ((ConfigurableVariable)b).Description = "Enables Starstorm 2's random events, including storms. Set to false to disable events."; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigMain; b.CheckBoxConfig = new CheckBoxConfig { restartRequired = true }; }).DoConfigure(); public static void Init() { if (ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableEvents)) { EventCard[] array = SS2Assets.LoadAllAssetsOfType(SS2Bundle.Events); foreach (EventCard val in array) { string name = ((Object)val).name; if (ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)ConfigLoader.MakeConfigurableBool(true, (Action)delegate(ConfigurableBool b) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_0073: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Events"; ((ConfigurableVariable)b).Key = "Enable " + MSUtil.NicifyString(name); ((ConfigurableVariable)b).Description = "Set to false to disable this event"; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigMain; CheckBoxConfig val3 = new CheckBoxConfig(); object obj = <>c.<>9__2_2; if (obj == null) { IsDisabledDelegate val4 = () => !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableEvents); <>c.<>9__2_2 = val4; obj = (object)val4; } ((BaseOptionConfig)val3).checkIfDisabled = (IsDisabledDelegate)obj; ((BaseOptionConfig)val3).restartRequired = true; b.CheckBoxConfig = val3; }).DoConfigure())) { EventCatalog.AddCard(val); } } } if (ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableEvents)) { EventDirectorCategorySelection[] array2 = SS2Assets.LoadAllAssetsOfType(SS2Bundle.Events); foreach (EventDirectorCategorySelection val2 in array2) { EventCatalog.AddCategory(val2); Debug.Log((object)("added category: " + ((Object)val2).name)); } } ConfigLoader.MakeConfigurableBool(true, (Action)delegate(ConfigurableBool b) { ((ConfigurableVariable)b).Section = "Visuals"; ((ConfigurableVariable)b).Key = "Custom Main Menu"; ((ConfigurableVariable)b).Description = "Setting this to false returns the main menu to the original, bright one."; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigMisc; ((ConfigurableVariable)(object)b).OnConfigChanged += delegate(bool b1) { if (b1) { SceneManager.sceneLoaded -= StormOnMenu; SceneManager.sceneLoaded += StormOnMenu; } else { SceneManager.sceneLoaded -= StormOnMenu; } }; }).DoConfigure(); EventDirector.AddNewEntityStateMachine("Nemesis"); } private static void StormOnMenu(Scene scene, LoadSceneMode mode) { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) if (((Scene)(ref scene)).name.Equals("title")) { DateTime today = DateTime.Today; if (today.Month == 12 && (today.Day == 27 || today.Day == 26 || today.Day == 25 || today.Day == 24 || today.Day == 23)) { Object.Instantiate(SS2Assets.LoadAsset("ChristmasMenuEffect", SS2Bundle.Events), Vector3.zero, Quaternion.identity); Debug.Log((object)"Merry Christmas from TeamMoonstorm!! :)"); } else { Object.Instantiate(SS2Assets.LoadAsset("StormMainMenuEffect", SS2Bundle.Events), Vector3.zero, Quaternion.identity); } } } } public class ShrineEtherealBehavior : NetworkBehaviour { public int maxPurchaseCount = 2; public int purchaseCount; private float refreshTimer; private bool waitingForRefresh; [SerializeField] public PurchaseInteraction purchaseInteraction; public void Start() { Debug.Log((object)"starting ethereal shrine behavior"); purchaseInteraction = ((Component)this).GetComponent(); ((UnityEvent)(object)purchaseInteraction.onPurchase).AddListener((UnityAction)ActivateEtherealTerminal); purchaseCount = 0; if ((Object)(object)purchaseInteraction == (Object)null) { Debug.Log((object)"pi null"); } else { Debug.Log((object)"pi set"); } } public void FixedUpdate() { if (waitingForRefresh) { refreshTimer -= Time.fixedDeltaTime; if (refreshTimer <= 0f && purchaseCount < maxPurchaseCount) { Debug.Log((object)"set to avaliable"); purchaseInteraction.SetAvailable(true); waitingForRefresh = false; } } } public void ActivateEtherealTerminal(Interactor interactor) { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Expected O, but got Unknown if (purchaseCount == 0) { Debug.Log((object)"Processed first ethereal terminal use..."); purchaseInteraction.SetAvailable(false); purchaseInteraction.contextToken = "SS2_ETHEREAL_WARNING2"; purchaseInteraction.displayNameToken = "SS2_ETHEREAL_NAME2"; purchaseCount++; refreshTimer = 2f; CharacterBody component = ((Component)interactor).GetComponent(); Chat.SendBroadcastChat((ChatMessageBase)new SubjectFormatChatMessage { subjectAsCharacterBody = component, baseToken = "SS2_SHRINE_ETHEREAL_WARN_MESSAGE" }); waitingForRefresh = true; return; } Debug.Log((object)"Beginning to activate ethereal terminal."); purchaseInteraction.SetAvailable(false); waitingForRefresh = true; if ((Object)(object)TeleporterInteraction.instance != (Object)null) { GameObject val = GameObject.Find("Teleporter1(Clone)"); if ((Object)(object)val == (Object)null) { Debug.Log((object)"Failed to find regular teleporter, searching for Lunar.."); val = GameObject.Find("LunarTeleporter Variant(Clone)"); if ((Object)(object)val == (Object)null) { Debug.Log((object)"Could not find teleporter!"); return; } } TeleporterUpgradeController component2 = val.GetComponent(); if (!((Object)(object)component2 != (Object)null)) { return; } component2.CallCmdUpdateIsEthereal(value: true); Ethereal.teleIsEthereal = true; Debug.Log((object)"Set ethereal to true"); } CharacterBody component3 = ((Component)interactor).GetComponent(); Chat.SendBroadcastChat((ChatMessageBase)new SubjectFormatChatMessage { subjectAsCharacterBody = component3, baseToken = "SS2_SHRINE_ETHEREAL_USE_MESSAGE" }); purchaseCount++; refreshTimer = 2f; Debug.Log((object)"Finished ethereal setup from shrine."); } private void UNetVersion() { } 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 VoidRock : NetworkBehaviour { public int maxPurchaseCount = 1; public int purchaseCount; private float refreshTimer; private bool waitingForRefresh; [SerializeField] public PurchaseInteraction purchaseInteraction; public void Start() { purchaseInteraction = ((Component)this).GetComponent(); ((UnityEvent)(object)purchaseInteraction.onPurchase).AddListener((UnityAction)DropItem); } public void DropItem(Interactor interactor) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0015: 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_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: 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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex(SS2Content.Items.VoidRock.itemIndex), new Vector3(((Component)this).transform.position.x, ((Component)this).transform.position.y + 0.5f, ((Component)this).transform.position.z), Vector3.up * 5f + ((Component)this).transform.forward * 2f); CharacterBody component = ((Component)interactor).GetComponent(); Moonstorm.Starstorm2.Items.VoidRock.invasionStage = true; Moonstorm.Starstorm2.Items.VoidRock.setStage = true; Moonstorm.Starstorm2.Items.VoidRock.initialStage = Run.instance.stageClearCount; Moonstorm.Starstorm2.Items.VoidRock.inventory = component.inventory; Util.PlaySound("Play_item_void_treasureCache_open", ((Component)this).gameObject); _ = (Object)(object)component != (Object)null; } [Server] public static void CreateItemTakenOrb(Vector3 effectOrigin, GameObject targetObject, ItemIndex itemIndex) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0051: 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_0059: Expected I4, but got Unknown //IL_005a: Expected O, but got Unknown if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void Moonstorm.Starstorm2.VoidRock::CreateItemTakenOrb(UnityEngine.Vector3,UnityEngine.GameObject,RoR2.ItemIndex)' called on client"); return; } if (!NetworkServer.active) { Debug.Log((object)"client client client @ Void Rock CreateItemTakenOrb"); return; } GameObject obj = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/ItemTakenOrbEffect.prefab").WaitForCompletion(); EffectData val = new EffectData { origin = effectOrigin, genericFloat = 1.5f, genericUInt = (uint)(itemIndex + 1) }; val.SetNetworkedObjectReference(targetObject); EffectManager.SpawnEffect(obj, val, true); } private void UNetVersion() { } 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 enum SS2Bundle { Invalid, All, Main, Base, Artifacts, Executioner, Executioner2, Chirr, Nemmando, NemCommando, NemMercenary, Equipments, Items, Events, Stages, VoidShop, Vanilla, Indev, Interactables, Monsters, Shared } public class SS2Assets : AssetsLoader { private const string ASSET_BUNDLE_FOLDER_NAME = "assetbundles"; private const string MAIN = "ss2main"; private const string BASE = "ss2base"; private const string ARTIFACTS = "ss2artifacts"; private const string EXECUTIONER = "ss2executioner"; private const string EXECUTIONER2 = "ss2executioner2"; private const string CHIRR = "ss2chirr"; private const string NEMMANDO = "ss2nemmando"; private const string NEMCOMMANDO = "ss2nemcommando"; private const string NEMMERCENARY = "ss2nemmercenary"; private const string EQUIPS = "ss2equipments"; private const string ITEMS = "ss2items"; private const string EVENTS = "ss2events"; private const string STAGES = "ss2stages"; private const string VANILLA = "ss2vanilla"; private const string DEV = "ss2dev"; private const string INTERACTABLES = "ss2interactables"; private const string MONSTERS = "ss2monsters"; private const string SHARED = "ss2shared"; private static Dictionary assetBundles = new Dictionary(); private static AssetBundle[] streamedSceneBundles = Array.Empty(); public override AssetBundle MainAssetBundle => GetAssetBundle(SS2Bundle.Main); public string AssemblyDir => Path.GetDirectoryName(Starstorm.pluginInfo.Location); [Obsolete("LoadAsset should not be used without specifying the SS2Bundle")] public static TAsset LoadAsset(string name) where TAsset : Object { return LoadAsset(name, SS2Bundle.All); } [Obsolete("LoadAllAssetsOfType should not be used without specifying the SS2Bundle")] public static TAsset[] LoadAllAssetsOfType() where TAsset : Object { return LoadAllAssetsOfType(SS2Bundle.All); } public static TAsset LoadAsset(string name, SS2Bundle bundle) where TAsset : Object { if (AssetsLoader.Instance == null) { SS2Log.Error("Cannot load asset when there's no instance of SS2Assets!", 88, "LoadAsset"); return default(TAsset); } return AssetsLoader.Instance.LoadAssetInternal(name, bundle); } public static TAsset[] LoadAllAssetsOfType(SS2Bundle bundle) where TAsset : Object { if (AssetsLoader.Instance == null) { SS2Log.Error("Cannot load asset when there's no instance of SS2Assets!", 97, "LoadAllAssetsOfType"); return null; } return AssetsLoader.Instance.LoadAllAssetsOfTypeInternal(bundle); } public AssetBundle GetAssetBundle(SS2Bundle bundle) { return assetBundles[bundle]; } internal void Init() { string[] assetBundlePaths = GetAssetBundlePaths(); foreach (string text in assetBundlePaths) { string fileName = Path.GetFileName(text); switch (fileName) { case "ss2main": LoadAndAssign(text, SS2Bundle.Main); continue; case "ss2base": LoadAndAssign(text, SS2Bundle.Base); continue; case "ss2artifacts": LoadAndAssign(text, SS2Bundle.Artifacts); continue; case "ss2executioner": LoadAndAssign(text, SS2Bundle.Executioner); continue; case "ss2executioner2": LoadAndAssign(text, SS2Bundle.Executioner2); continue; case "ss2chirr": LoadAndAssign(text, SS2Bundle.Chirr); continue; case "ss2nemmando": LoadAndAssign(text, SS2Bundle.Nemmando); continue; case "ss2nemcommando": LoadAndAssign(text, SS2Bundle.NemCommando); continue; case "ss2nemmercenary": LoadAndAssign(text, SS2Bundle.NemMercenary); continue; case "ss2equipments": LoadAndAssign(text, SS2Bundle.Equipments); continue; case "ss2items": LoadAndAssign(text, SS2Bundle.Items); continue; case "ss2events": LoadAndAssign(text, SS2Bundle.Events); continue; case "ss2stages": LoadAndAssign(text, SS2Bundle.Stages); continue; case "ss2vanilla": LoadAndAssign(text, SS2Bundle.Vanilla); continue; case "ss2interactables": LoadAndAssign(text, SS2Bundle.Interactables); continue; case "ss2monsters": LoadAndAssign(text, SS2Bundle.Monsters); continue; case "ss2dev": LoadAndAssign(text, SS2Bundle.Indev); continue; case "ss2shared": LoadAndAssign(text, SS2Bundle.Shared); continue; } try { AssetBundle val = AssetBundle.LoadFromFile(text); if (!Object.op_Implicit((Object)(object)val)) { throw new FileLoadException("AssetBundle.LoadFromFile did not return an asset bundle. (Path:" + text + " FileName:" + fileName + ")"); } if (!val.isStreamedSceneAssetBundle) { throw new Exception("AssetBundle is not a streamed scene bundle, but it's file name was not found on the Switch statement. (Path:" + text + " FileName:" + fileName + ")"); } ArrayUtils.ArrayAppend(ref streamedSceneBundles, ref val); SS2Log.Warning("Invalid or Unexpected file in the AssetBundles folder (File name: " + fileName + ", Path: " + text + ")"); } catch (Exception arg) { SS2Log.Error($"Default statement on bundle loading method hit, Exception thrown.\n{arg}", 197, "Init"); } } static void LoadAndAssign(string path, SS2Bundle bundleEnum) { try { AssetBundle val2 = AssetBundle.LoadFromFile(path); if (!Object.op_Implicit((Object)(object)val2)) { throw new FileLoadException("AssetBundle.LoadFromFile did not return an asset bundle"); } if (assetBundles.ContainsKey(bundleEnum)) { throw new InvalidOperationException($"AssetBundle in path loaded succesfully, but the assetBundles dictionary already contains an entry for {bundleEnum}."); } assetBundles[bundleEnum] = val2; } catch (Exception arg2) { SS2Log.Error($"Could not load assetbundle at path {path} and assign to enum {bundleEnum}. {arg2}", 222, "Init"); } } } private TAsset LoadAssetInternal(string name, SS2Bundle bundle) where TAsset : Object { SS2Bundle foundInBundle2; if (bundle == SS2Bundle.All) { return FindAsset(name, out foundInBundle2); } return assetBundles[bundle].LoadAsset(name); static TAsset FindAsset(string assetName, out SS2Bundle foundInBundle) where TAsset : Object { SS2Bundle sS2Bundle = default(SS2Bundle); AssetBundle val = default(AssetBundle); foreach (KeyValuePair assetBundle in assetBundles) { MSUtil.Deconstruct(assetBundle, ref sS2Bundle, ref val); SS2Bundle sS2Bundle2 = sS2Bundle; TAsset val2 = val.LoadAsset(assetName); if (Object.op_Implicit((Object)(object)val2)) { foundInBundle = sS2Bundle2; return val2; } } foundInBundle = SS2Bundle.Invalid; return default(TAsset); } } private TAsset[] LoadAllAssetsOfTypeInternal(SS2Bundle bundle) where TAsset : Object { List list = new List(); if (bundle == SS2Bundle.All) { FindAssets(list); return list.ToArray(); } list = assetBundles[bundle].LoadAllAssets().ToList(); return list.ToArray(); static void FindAssets(List output) where TAsset : Object { SS2Bundle sS2Bundle = default(SS2Bundle); AssetBundle val = default(AssetBundle); foreach (KeyValuePair assetBundle in assetBundles) { MSUtil.Deconstruct(assetBundle, ref sS2Bundle, ref val); AssetBundle val2 = val; output.AddRange(val2.LoadAllAssets()); } } } internal void SwapMaterialShaders() { ((AssetsLoader)this).SwapShadersFromMaterials(from mat in SS2Assets.LoadAllAssetsOfType(SS2Bundle.All) where ((Object)mat.shader).name.StartsWith("Stubbed") select mat); } internal void FinalizeCopiedMaterials() { SS2Bundle sS2Bundle = default(SS2Bundle); AssetBundle val = default(AssetBundle); foreach (KeyValuePair assetBundle in assetBundles) { MSUtil.Deconstruct(assetBundle, ref sS2Bundle, ref val); AssetBundle val2 = val; ((AssetsLoader)this).FinalizeMaterialsWithAddressableMaterialShader(val2); } } private string[] GetAssetBundlePaths() { return (from filePath in Directory.GetFiles(Path.Combine(AssemblyDir, "assetbundles")) where !filePath.EndsWith(".manifest") select filePath).ToArray(); } private void LoadPostProcessing() { PostProcessProfile[] array = SS2Assets.LoadAllAssetsOfType(SS2Bundle.All); SS2RampFog sS2RampFog = default(SS2RampFog); SS2SobelOutline sS2SobelOutline = default(SS2SobelOutline); SS2SobelRain sS2SobelRain = default(SS2SobelRain); foreach (PostProcessProfile val in array) { SS2Log.Error(val, 334, "LoadPostProcessing"); bool isDirty = false; if (val.TryGetSettings(ref sS2RampFog)) { RampFog obj = val.AddSettings(); ((PostProcessEffectSettings)obj).enabled = ((PostProcessEffectSettings)sS2RampFog).enabled; ((PostProcessEffectSettings)obj).active = ((PostProcessEffectSettings)sS2RampFog).active; obj.fogIntensity = sS2RampFog.fogIntensity; obj.fogPower = sS2RampFog.fogPower; obj.fogZero = sS2RampFog.fogZero; obj.fogOne = sS2RampFog.fogOne; obj.fogHeightStart = sS2RampFog.fogHeightStart; obj.fogHeightEnd = sS2RampFog.fogHeightEnd; obj.fogHeightIntensity = sS2RampFog.fogHeightIntensity; obj.fogColorStart = sS2RampFog.fogColorStart; obj.fogColorMid = sS2RampFog.fogColorMid; obj.fogColorEnd = sS2RampFog.fogColorEnd; obj.skyboxStrength = sS2RampFog.skyboxStrength; val.RemoveSettings(typeof(SS2RampFog)); isDirty = true; } if (val.TryGetSettings(ref sS2SobelOutline)) { SobelOutline obj2 = val.AddSettings(); ((PostProcessEffectSettings)obj2).enabled = ((PostProcessEffectSettings)sS2SobelOutline).enabled; ((PostProcessEffectSettings)obj2).active = ((PostProcessEffectSettings)sS2SobelOutline).active; obj2.outlineIntensity = sS2SobelOutline.outlineIntensity; obj2.outlineScale = sS2SobelOutline.outlineScale; val.RemoveSettings(typeof(SS2SobelOutline)); isDirty = true; } if (val.TryGetSettings(ref sS2SobelRain)) { SobelRain obj3 = val.AddSettings(); ((PostProcessEffectSettings)obj3).enabled = ((PostProcessEffectSettings)sS2SobelRain).enabled; ((PostProcessEffectSettings)obj3).active = ((PostProcessEffectSettings)sS2SobelRain).active; obj3.rainIntensity = sS2SobelRain.rainIntensity; obj3.outlineScale = sS2SobelRain.outlineScale; obj3.rainDensity = sS2SobelRain.rainDensity; obj3.rainTexture = sS2SobelRain.rainTexture; obj3.rainColor = sS2SobelRain.rainColor; val.RemoveSettings(typeof(SS2SobelRain)); isDirty = true; } val.isDirty = isDirty; } } } public class SS2Config : ConfigLoader { public const string PREFIX = "SS2."; internal const string IDMain = "SS2.Main"; internal const string IDItem = "SS2.Items"; internal const string IDArtifact = "SS2.Artifacts"; internal const string IDSurvivor = "SS2.Survivors"; internal const string IDMisc = "SS2.Miscellaneous"; public static ConfigFile ConfigMain; public static ConfigFile ConfigItem; public static ConfigFile ConfigArtifact; public static ConfigFile ConfigSurvivor; public static ConfigFile ConfigMisc; internal static ConfigurableBool UnlockAll = new ConfigurableBool(false) { Section = "General", Key = "Unlock All", Description = "Setting this to true unlocks all the content in Starstorm 2, excluding skin unlocks.", ModGUID = "com.TeamMoonstorm.Starstorm2", ModName = "Starstorm 2", CheckBoxConfig = new CheckBoxConfig { restartRequired = true } }; internal static ConfigEntry RestKeybind; internal static KeyCode restKeybind; internal static ConfigEntry TauntKeybind; internal static KeyCode tauntKeybind; internal static List> ItemToggles; public override BaseUnityPlugin MainClass => (BaseUnityPlugin)(object)Starstorm.instance; public override bool CreateSubFolder => true; public void Init() { ModSettingsManager.SetModIcon(SS2Assets.LoadAsset("icon", SS2Bundle.Main), "com.TeamMoonstorm.Starstorm2", "Starstorm 2"); ModSettingsManager.SetModDescription("A general content mod adapting ideas from Risk of Rain 1's Starstorm", "com.TeamMoonstorm.Starstorm2", "Starstorm 2"); ConfigMain = ((ConfigLoader)this).CreateConfigFile("SS2.Main", true); ConfigItem = ((ConfigLoader)this).CreateConfigFile("SS2.Items", true); ConfigSurvivor = ((ConfigLoader)this).CreateConfigFile("SS2.Survivors", true); ConfigArtifact = ((ConfigLoader)this).CreateConfigFile("SS2.Artifacts", true); ConfigMisc = ((ConfigLoader)this).CreateConfigFile("SS2.Miscellaneous", true); SetConfigs(); } private static void SetConfigs() { UnlockAll.SetConfigFile(ConfigMain).DoConfigure(); } } public static class SS2ExperienceManager { public class TransmitExperienceOffset : INetMessage, ISerializableObject { private long OffsetAmount; private NetworkInstanceId MasterObjectID; public TransmitExperienceOffset() { } public TransmitExperienceOffset(long offsetAmount, NetworkInstanceId masterObjectID) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) OffsetAmount = offsetAmount; MasterObjectID = masterObjectID; } public void Serialize(NetworkWriter writer) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) writer.Write(OffsetAmount); writer.Write(MasterObjectID); } public void Deserialize(NetworkReader reader) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) OffsetAmount = reader.ReadInt64(); MasterObjectID = reader.ReadNetworkId(); } public void OnReceived() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { return; } GameObject val = Util.FindNetworkObject(MasterObjectID); if (Object.op_Implicit((Object)(object)val)) { CharacterMaster component = val.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.SS2OffsetExperience(OffsetAmount); } } } } public class TrailingExpBar : MonoBehaviour { public static GameObject trailingFillBarPrefab; public ExpBar expBar; private RectTransform baseBarTransform; private RectTransform fillRectTransform; private float x = 1f; private float xVelocity; public void Start() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown baseBarTransform = expBar.fillRectTransform; fillRectTransform = (RectTransform)Object.Instantiate(trailingFillBarPrefab, ((Transform)baseBarTransform).parent).transform; } public void Update() { //IL_0006: 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) //IL_006a: Unknown result type (might be due to invalid IL or missing references) float num = baseBarTransform.anchorMax.x; x = Mathf.SmoothDamp(x, num, ref xVelocity, 0.2f, 1f, Time.deltaTime); fillRectTransform.anchorMin = new Vector2(Mathf.Min(Mathf.Clamp01(x), num), 0f); fillRectTransform.anchorMax = new Vector2(num, 1f); } public void OnEnable() { GlobalEventManager.onCharacterLevelUp += GlobalEventManager_onCharacterLevelUp; } public void OnDisable() { GlobalEventManager.onCharacterLevelUp -= GlobalEventManager_onCharacterLevelUp; } private void GlobalEventManager_onCharacterLevelUp(CharacterBody body) { if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)expBar.source) && (Object)(object)expBar.source.bodyInstanceObject == (Object)(object)((Component)body).gameObject) { x -= 1f; } } } [RooConfigurableField("SS2.Miscellaneous", ConfigSection = "Visuals", ConfigName = "Improved Experience Visuals", ConfigDesc = "Enable the new experience visuals?")] public static bool enableNewExperienceVisuals = true; public static Dictionary masterToFoundExperience = new Dictionary(); public static Dictionary masterToExperienceOffset = new Dictionary(); private static bool extraHooksSet = false; private static long? activeExperienceOffset = null; public static ulong SS2GetAdjustedExperience(this CharacterMaster characterMaster) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) if (characterMaster.hasBody) { characterMaster.GetBody().RecalculateStats(); } if (masterToFoundExperience.TryGetValue(characterMaster, out var value)) { return value; } return TeamManager.instance.GetTeamExperience(characterMaster.teamIndex); } public static void SS2OffsetExperience(this CharacterMaster characterMaster, long amount, bool transmitToClients = false) { //IL_005e: Unknown result type (might be due to invalid IL or missing references) long num = (masterToExperienceOffset.ContainsKey(characterMaster) ? masterToExperienceOffset[characterMaster] : 0); masterToExperienceOffset[characterMaster] = num + amount; EvaluateExtraHooks(); if (characterMaster.hasBody) { characterMaster.GetBody().MarkAllStatsDirty(); } if (transmitToClients && NetworkServer.active) { NetworkIdentity component = ((Component)characterMaster).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { NetMessageExtensions.Send((INetMessage)(object)new TransmitExperienceOffset(amount, component.netId), (NetworkDestination)1); } } } [SystemInitializer(new Type[] { })] public static void Init() { //IL_0044: 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_0068: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) if (enableNewExperienceVisuals) { ExpBar expBar = LegacyResourcesAPI.Load("Prefabs/HUDSimple").GetComponent().expBar; TrailingExpBar.trailingFillBarPrefab = PrefabAPI.InstantiateClone(((Component)expBar.fillRectTransform).gameObject, "TrailingFillPanel", false); ((Graphic)TrailingExpBar.trailingFillBarPrefab.GetComponent()).color = Color.white; RectTransform val = (RectTransform)TrailingExpBar.trailingFillBarPrefab.transform; val.anchorMax = new Vector2(0f, 1f); val.anchorMin = new Vector2(0f, 0f); ((Component)expBar).gameObject.AddComponent().expBar = expBar; } } private static uint TeamManager_GetTeamLevel(orig_GetTeamLevel orig, TeamManager self, TeamIndex teamIndex) { //IL_001b: 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) if (activeExperienceOffset.HasValue) { return TeamManager.FindLevelForExperience(self.GetTeamExperience(teamIndex)); } return orig.Invoke(self, teamIndex); } private static void CharacterBody_RecalculateStats(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.MoveAfterLabels(); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Action)delegate(CharacterBody body) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)body.master)) { masterToFoundExperience[body.master] = TeamManager.instance.GetTeamExperience(body.master.teamIndex); } }); } private static void CharacterMaster_OnDestroy(orig_OnDestroy orig, CharacterMaster self) { orig.Invoke(self); if (masterToFoundExperience.ContainsKey(self)) { masterToFoundExperience.Remove(self); } if (masterToExperienceOffset.ContainsKey(self)) { masterToExperienceOffset.Remove(self); } EvaluateExtraHooks(); } private static void EvaluateExtraHooks() { bool flag = masterToExperienceOffset.Count > 0; if (flag != extraHooksSet) { if (flag) { SetExtraHooks(); } else { UnsetExtraHooks(); } } } private static void SetExtraHooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown TeamManager.SetTeamExperience += new hook_SetTeamExperience(TeamManager_SetTeamExperience); ExpBar.Update += new hook_Update(ExpBar_Update); CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats); TeamManager.GetTeamCurrentLevelExperience += new hook_GetTeamCurrentLevelExperience(TeamManager_GetTeamCurrentLevelExperience); TeamManager.GetTeamNextLevelExperience += new hook_GetTeamNextLevelExperience(TeamManager_GetTeamNextLevelExperience); TeamManager.GetTeamExperience += new hook_GetTeamExperience(TeamManager_GetTeamExperience); extraHooksSet = true; } private static void UnsetExtraHooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown TeamManager.SetTeamExperience -= new hook_SetTeamExperience(TeamManager_SetTeamExperience); ExpBar.Update -= new hook_Update(ExpBar_Update); CharacterBody.RecalculateStats -= new hook_RecalculateStats(CharacterBody_RecalculateStats); TeamManager.GetTeamCurrentLevelExperience -= new hook_GetTeamCurrentLevelExperience(TeamManager_GetTeamCurrentLevelExperience); TeamManager.GetTeamNextLevelExperience -= new hook_GetTeamNextLevelExperience(TeamManager_GetTeamNextLevelExperience); TeamManager.GetTeamExperience -= new hook_GetTeamExperience(TeamManager_GetTeamExperience); extraHooksSet = false; } private static void TeamManager_SetTeamExperience(orig_SetTeamExperience orig, TeamManager self, TeamIndex teamIndex, ulong newExperience) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, teamIndex, newExperience); foreach (CharacterMaster key in masterToExperienceOffset.Keys) { if (Object.op_Implicit((Object)(object)key) && key.hasBody) { key.GetBody().MarkAllStatsDirty(); } } } private static void ExpBar_Update(orig_Update orig, ExpBar self) { if (Object.op_Implicit((Object)(object)self.source) && masterToExperienceOffset.TryGetValue(self.source, out var value)) { bool hasValue = activeExperienceOffset.HasValue; activeExperienceOffset = value; try { orig.Invoke(self); return; } finally { if (!hasValue) { activeExperienceOffset = null; } } } orig.Invoke(self); } private static void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self) { if (Object.op_Implicit((Object)(object)self.master) && masterToExperienceOffset.TryGetValue(self.master, out var value)) { bool hasValue = activeExperienceOffset.HasValue; activeExperienceOffset = value; try { orig.Invoke(self); return; } finally { if (!hasValue) { activeExperienceOffset = null; } } } orig.Invoke(self); } private static ulong TeamManager_GetTeamCurrentLevelExperience(orig_GetTeamCurrentLevelExperience orig, TeamManager self, TeamIndex teamIndex) { //IL_001b: 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) if (activeExperienceOffset.HasValue) { return TeamManager.GetExperienceForLevel(self.GetTeamLevel(teamIndex)); } return orig.Invoke(self, teamIndex); } private static ulong TeamManager_GetTeamNextLevelExperience(orig_GetTeamNextLevelExperience orig, TeamManager self, TeamIndex teamIndex) { //IL_001d: 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) if (activeExperienceOffset.HasValue) { return TeamManager.GetExperienceForLevel(self.GetTeamLevel(teamIndex) + 1); } return orig.Invoke(self, teamIndex); } private static ulong TeamManager_GetTeamExperience(orig_GetTeamExperience orig, TeamManager self, TeamIndex teamIndex) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) ulong num = orig.Invoke(self, teamIndex); if (activeExperienceOffset.HasValue) { return (ulong)Math.Max((long)num + activeExperienceOffset.Value, 0L); } return num; } } public class SS2Language : LanguageLoader { public override string AssemblyDir => AssetsLoader.Instance.AssemblyDir; public override string LanguagesFolderName => "SS2Lang"; internal void Init() { ((LanguageLoader)this).LoadLanguages(); TMProEffects.Init(); } } public static class SoundBankManager { public static string soundBankDirectory => Path.Combine(AssetsLoader.Instance.AssemblyDir, "soundbanks"); public static void Init() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0012: 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_002c: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.AddBasePath(soundBankDirectory); uint num = default(uint); AkSoundEngine.LoadFilePackage("Starstorm2.pck", ref num); uint num2 = default(uint); AkSoundEngine.LoadBank("Starstorm2", ref num2); uint num3 = default(uint); AkSoundEngine.LoadBank("SS2Init", ref num3); } [SystemInitializer(new Type[] { typeof(MusicTrackCatalog) })] public static void MusicInit() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) uint num = default(uint); AkSoundEngine.LoadBank("SS2Music", ref num); Object.Instantiate(SS2Assets.LoadAsset("SS2MusicInitializer", SS2Bundle.Base)); } } public static class TMProEffects { public class SS2TextEffects : MonoBehaviour { public TMP_Text textComponent; public bool textChanged; public TMP_MeshInfo[] cachedMeshInfo; public float updateTimer; public float updateFrequency = 0.016f; public void Awake() { textComponent = ((Component)this).GetComponent(); textChanged = true; } public void Start() { if (Object.op_Implicit((Object)(object)textComponent) && ((Behaviour)textComponent).isActiveAndEnabled) { textComponent.ForceMeshUpdate(false, false); } } public void OnEnable() { TMPro_EventManager.TEXT_CHANGED_EVENT.Add((Action)ON_TEXT_CHANGED); } public void OnDisable() { TMPro_EventManager.TEXT_CHANGED_EVENT.Remove((Action)ON_TEXT_CHANGED); } public void ON_TEXT_CHANGED(Object obj) { if (obj == (Object)(object)textComponent) { textChanged = true; } } public void Update() { //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_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_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_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: 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_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_0370: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_030c: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Unknown result type (might be due to invalid IL or missing references) updateTimer -= Time.deltaTime; Vector3 val2 = default(Vector3); Vector3 val4 = default(Vector3); while (updateTimer <= 0f) { updateTimer += updateFrequency; if (!Object.op_Implicit((Object)(object)textComponent) || !((Behaviour)textComponent).isActiveAndEnabled) { continue; } TMP_TextInfo textInfo = textComponent.textInfo; if (textInfo == null || textInfo.meshInfo == null || textInfo.meshInfo.Length == 0 || textInfo.meshInfo[0].vertices == null) { break; } if (textChanged) { textChanged = false; cachedMeshInfo = textInfo.CopyMeshInfoVertexData(); } bool flag = false; foreach (TMP_LinkInfo item in textInfo.linkInfo.Where((TMP_LinkInfo x) => ((TMP_LinkInfo)(ref x)).GetLinkID() == "textWavy")) { for (int i = item.linkTextfirstCharacterIndex; i < item.linkTextfirstCharacterIndex + item.linkTextLength; i++) { TMP_CharacterInfo val = textInfo.characterInfo[i]; if (val.isVisible) { flag = true; float num = 6f * val.scale; Vector3[] vertices = cachedMeshInfo[val.materialReferenceIndex].vertices; _ = ref cachedMeshInfo[val.materialReferenceIndex]; Vector3[] vertices2 = textInfo.meshInfo[val.materialReferenceIndex].vertices; _ = ref textInfo.meshInfo[val.materialReferenceIndex]; ((Vector3)(ref val2))..ctor(0f, Mathf.Sin(Time.time * 8f + 0.22f * (float)i) * num, 0f); for (int j = 0; j <= 3; j++) { vertices2[val.vertexIndex + j] = vertices[val.vertexIndex + j] + val2; } } } } foreach (TMP_LinkInfo item2 in textInfo.linkInfo.Where((TMP_LinkInfo x) => ((TMP_LinkInfo)(ref x)).GetLinkID() == "textShaky")) { for (int k = item2.linkTextfirstCharacterIndex; k < item2.linkTextfirstCharacterIndex + item2.linkTextLength; k++) { TMP_CharacterInfo val3 = textInfo.characterInfo[k]; if (val3.isVisible) { flag = true; float num2 = 3f * val3.scale; Vector3[] vertices3 = cachedMeshInfo[val3.materialReferenceIndex].vertices; _ = ref cachedMeshInfo[val3.materialReferenceIndex]; Vector3[] vertices4 = textInfo.meshInfo[val3.materialReferenceIndex].vertices; _ = ref textInfo.meshInfo[val3.materialReferenceIndex]; ((Vector3)(ref val4))..ctor(Random.Range(0f - num2, num2), Random.Range(0f - num2, num2), 0f); for (int l = 0; l <= 3; l++) { vertices4[val3.vertexIndex + l] = vertices3[val3.vertexIndex + l] + val4; } } } } if (flag) { for (int m = 0; m < textInfo.meshInfo.Length; m++) { TMP_MeshInfo val5 = textInfo.meshInfo[m]; val5.mesh.vertices = val5.vertices; val5.mesh.colors32 = val5.colors32; textComponent.UpdateGeometry(val5.mesh, m); textComponent.UpdateVertexData((TMP_VertexDataUpdateFlags)16); } } } } } public static void Init() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown ChatBox.Start += new hook_Start(ChatBox_Start); HGTextMeshProUGUI.Awake += new hook_Awake(HGTextMeshProUGUI_Awake); } private static void ChatBox_Start(orig_Start orig, ChatBox self) { orig.Invoke(self); if (!Object.op_Implicit((Object)(object)((Component)self.messagesText.textComponent).GetComponent())) { ((Component)self.messagesText.textComponent).gameObject.AddComponent(); } } private static void HGTextMeshProUGUI_Awake(orig_Awake orig, HGTextMeshProUGUI self) { orig.Invoke(self); if (!Object.op_Implicit((Object)(object)((Component)self).GetComponent())) { ((Component)self).gameObject.AddComponent().textComponent = (TMP_Text)(object)self; } } } public class Void : NetworkBehaviour { public static GameObject shrinePrefab; internal static void Init() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown shrinePrefab = PrefabAPI.InstantiateClone(SS2Assets.LoadAsset("VoidRockPickup", SS2Bundle.Interactables), "BondPickup", true); PrefabAPI.RegisterNetworkPrefab(shrinePrefab); SceneDirector.Start += new hook_Start(SceneDirector_Start); } public static void SceneDirector_Start(orig_Start orig, SceneDirector self) { //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_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) //IL_0070: 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) orig.Invoke(self); Scene activeScene = SceneManager.GetActiveScene(); string name = ((Scene)(ref activeScene)).name; Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(-156f, 41f, 63f); Quaternion val2 = Quaternion.Euler(0f, 282f, 0f); if (NetworkServer.active && name == "arena" && Run.instance.IsExpansionEnabled(SS2Assets.LoadAsset("SS2ExpansionDef", SS2Bundle.Main))) { NetworkServer.Spawn(Object.Instantiate(shrinePrefab, val, val2)); } } private void UNetVersion() { } 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 SS2Content : ContentLoader { public static class Artifacts { public static ArtifactDef Cognation; public static ArtifactDef Havoc; public static ArtifactDef Deviation; } public static class Items { public static ItemDef ArmedBackpack; public static ItemDef CoffeeBag; public static ItemDef Cognation; public static ItemDef ChirrFriendHelper; public static ItemDef DetritiveTrematode; public static ItemDef Diary; public static ItemDef DormantFungus; public static ItemDef Fork; public static ItemDef Malice; public static ItemDef MoltenCoin; public static ItemDef Needles; public static ItemDef NemBossHelper; public static ItemDef VoidRock; public static ItemDef VoidRockTracker; public static ItemDef BloodTester; public static ItemDef FieldAccelerator; public static ItemDef HottestSauce; public static ItemDef HuntersSigil; public static ItemDef JetBoots; public static ItemDef Roulette; public static ItemDef StrangeCan; public static ItemDef WatchMetronome; public static ItemDef DroidHead; public static ItemDef ErraticGadget; public static ItemDef GreenChocolate; public static ItemDef NkotasHeritage; public static ItemDef PortableReactor; public static ItemDef SwiftSkateboard; public static ItemDef LowQualitySpeakers; public static ItemDef Augury; public static ItemDef SantaHat; public static ItemDef ScavengersFortune; public static ItemDef ShackledLamp; public static ItemDef StirringSoul; public static ItemDef Remuneration; public static ItemDef RelicOfDuality; public static ItemDef RelicOfExtinction; public static ItemDef RelicOfForce; public static ItemDef RelicOfMass; public static ItemDef RelicOfTermination; public static ItemDef RelicOfTerminationOld; public static ItemDef RelicOfEchelon; public static ItemDef Insecticide; public static ItemDef BabyToys; public static ItemDef X4; public static ItemDef BaneFlask; public static ItemDef NemesisBossHelper; public static ItemDef TerminationHelper; public static ItemDef GildedAmulet; } public static class Equipments { public static EquipmentDef ElitePurpleEquipment; public static EquipmentDef EliteKineticEquipment; public static EquipmentDef AffixEmpyrean; public static EquipmentDef equipDivineRight; public static EquipmentDef BackThruster; public static EquipmentDef CloakingHeadband; public static EquipmentDef GreaterWarbanner; public static EquipmentDef MIDAS; public static EquipmentDef PressurizedCanister; } public static class Buffs { public static BuffDef BuffAffixVoid; public static BuffDef BuffBackThruster; public static BuffDef BuffChirrConfuse; public static BuffDef BuffChirrConvert; public static BuffDef BuffChirrFriend; public static BuffDef BuffChirrGrabFriend; public static BuffDef BuffChirrRegen; public static BuffDef BuffChocolate; public static BuffDef BuffExecutionerSuperCharged; public static BuffDef BuffExecutionerArmor; public static BuffDef BuffFear; public static BuffDef BuffGouge; public static BuffDef BuffGreaterBanner; public static BuffDef BuffIntoxicated; public static BuffDef BuffInsecticide; public static BuffDef BuffCoffeeBag; public static BuffDef BuffNeedle; public static BuffDef BuffNeedleBuildup; public static BuffDef BuffNucleatorSpecial; public static BuffDef BuffReactor; public static BuffDef BuffScavengersFortune; public static BuffDef BuffSigil; public static BuffDef BuffKickflip; public static BuffDef BuffStorm; public static BuffDef BuffTrematodes; public static BuffDef BuffVoidLeech; public static BuffDef BuffWatchMetronome; public static BuffDef BuffWealth; public static BuffDef BuffSurrender; public static BuffDef BuffX4; public static BuffDef bdElitePurple; public static BuffDef bdPurplePoison; public static BuffDef bdEliteKinetic; public static BuffDef bdHiddenSlow20; public static BuffDef bdHiddenSpeed5; public static BuffDef bdMULENet; public static BuffDef bdExeCharge; public static BuffDef bdCanJump; public static BuffDef bdExeMuteCharge; public static BuffDef BuffTerminationCooldown; public static BuffDef BuffTerminationReady; public static BuffDef BuffTerminationFailed; public static BuffDef BuffTerminationVFX; public static BuffDef BuffEchelon; public static BuffDef BuffBane; public static BuffDef BuffRiposte; public static BuffDef BuffCyborgPrimary; public static BuffDef BuffCyborgTeleporter; public static BuffDef BuffBloonTrap; public static BuffDef bdOverstress; public static BuffDef bdNemCapDroneBuff; public static BuffDef bdShield; public static BuffDef bdParry; public static BuffDef bdKnightBuff; public static BuffDef bdFortified; public static BuffDef bdKnightCharged; public static BuffDef bdLampBuff; public static BuffDef bdNemCapManaReduction; public static BuffDef bdNemCapManaRegen; public static BuffDef bdEmpyrean; } public static class Elites { public static EliteDef edKinetic; public static EliteDef edEmpyrean; } public static class Scenes { public static SceneDef VoidShop; } public static class Survivors { public static SurvivorDef SurvivorChirr; public static SurvivorDef SurvivorExecutioner; public static SurvivorDef SurvivorNemmando; public static SurvivorDef survivorNemCommando; public static SurvivorDef survivorNemCaptain; public static SurvivorDef survivorNemMerc; } public static class ItemTierDefs { public static ItemTierDef Sibylline; } public override string identifier => "com.TeamMoonstorm.Starstorm2"; public override R2APISerializableContentPack SerializableContentPack { get; protected set; } = SS2Assets.LoadAsset("ContentPack", SS2Bundle.Main); public override Action[] LoadDispatchers { get; protected set; } public override Action[] PopulateFieldsDispatchers { get; protected set; } public override void Init() { ((ContentLoader)this).Init(); Typhoon.Init(); Events.Init(); Void.Init(); ((ContentLoader)this).LoadDispatchers = new Action[16] { delegate { ((ModuleBase)(object)new Moonstorm.Starstorm2.Modules.Scenes()).Initialize(); }, delegate { ((ModuleBase)(object)new Moonstorm.Starstorm2.Modules.ItemTiers()).Initialize(); }, delegate { ((ModuleBase)(object)new Moonstorm.Starstorm2.Modules.Items()).Initialize(); }, delegate { ((ModuleBase)(object)new Moonstorm.Starstorm2.Modules.Equipments()).Initialize(); }, delegate { ((ModuleBase)(object)new Moonstorm.Starstorm2.Modules.Buffs()).Initialize(); }, delegate { ((ModuleBase)(object)new Moonstorm.Starstorm2.Modules.DamageTypes()).Initialize(); }, delegate { ((ModuleBase)(object)new Moonstorm.Starstorm2.Modules.Projectiles()).Initialize(); }, delegate { ((ModuleBase)(object)new Moonstorm.Starstorm2.Modules.Elites()).Initialize(); }, delegate { ((ModuleBase)(object)new Characters()).Initialize(); }, delegate { ((ModuleBase)(object)new Moonstorm.Starstorm2.Modules.Artifacts()).Initialize(); }, delegate { ((ModuleBase)(object)new Moonstorm.Starstorm2.Modules.Interactables()).Initialize(); }, delegate { ((ModuleBase)(object)new Unlockables()).Initialize(); }, delegate { SS2Log.Info("Populating entity state array"); (from type in ((object)this).GetType().Assembly.GetTypes() where typeof(EntityState).IsAssignableFrom(type) select type).ToList().ForEach(delegate(Type state) { //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) ref SerializableEntityStateType[] entityStateTypes = ref ((ContentLoader)this).SerializableContentPack.entityStateTypes; SerializableEntityStateType val = new SerializableEntityStateType(state); ArrayUtils.ArrayAppend(ref entityStateTypes, ref val); }); }, delegate { SS2Log.Info("Populating EntityStateConfigurations"); ((ContentLoader)this).SerializableContentPack.entityStateConfigurations = SS2Assets.LoadAllAssetsOfType(SS2Bundle.All); }, delegate { SS2Log.Info("Populating effect prefabs"); ((ContentLoader)this).SerializableContentPack.effectPrefabs = ((ContentLoader)this).SerializableContentPack.effectPrefabs.Concat(from go in SS2Assets.LoadAllAssetsOfType(SS2Bundle.All) where Object.op_Implicit((Object)(object)go.GetComponent()) select go).ToArray(); }, delegate { SS2Log.Info("Swapping material shaders"); AssetsLoader.Instance.SwapMaterialShaders(); AssetsLoader.Instance.FinalizeCopiedMaterials(); SS2Log.Info("Finished swapping material shaders"); } }; ((ContentLoader)this).PopulateFieldsDispatchers = new Action[8] { delegate { ContentLoader.PopulateTypeFields(typeof(Artifacts), ((ContentLoader)this).ContentPack.artifactDefs); }, delegate { ContentLoader.PopulateTypeFields(typeof(Items), ((ContentLoader)this).ContentPack.itemDefs); }, delegate { ContentLoader.PopulateTypeFields(typeof(Equipments), ((ContentLoader)this).ContentPack.equipmentDefs); }, delegate { ContentLoader.PopulateTypeFields(typeof(Buffs), ((ContentLoader)this).ContentPack.buffDefs); }, delegate { ContentLoader.PopulateTypeFields(typeof(Elites), ((ContentLoader)this).ContentPack.eliteDefs); }, delegate { ContentLoader.PopulateTypeFields(typeof(Scenes), ((ContentLoader)this).ContentPack.sceneDefs); }, delegate { ContentLoader.PopulateTypeFields(typeof(Survivors), ((ContentLoader)this).ContentPack.survivorDefs); }, delegate { ContentLoader.PopulateTypeFields(typeof(ItemTierDefs), ((ContentLoader)this).ContentPack.itemTierDefs); } }; } } [CreateAssetMenu(fileName = "SS2EventCard", menuName = "Starstorm2/SS2EventCard")] public class SS2EventCard : EventCard { [Serializable] public class EventVFX { public Stage stageEnum; public string customStageName; public GameObject effectPrefab; } private static List instances = new List(); public ItemDef requiredItem; public ArtifactDef requiredArtifactDef; public bool requiresVoid; public GameObject fallbackVFX; public EventVFX[] eventVFX = Array.Empty(); public ReadOnlyDictionary vanillaStageToFXPrefab; public ReadOnlyDictionary customStageToFXPrefab; private void Awake() { instances?.Add(this); } private void OnDestroy() { instances?.Remove(this); } [SystemInitializer(new Type[] { })] private static void SystemInit() { ((ResourceAvailability)(ref EventCatalog.resourceAvailability)).CallWhenAvailable((Action)delegate { foreach (SS2EventCard instance in instances) { instance.CreateVFXDictionary(); } }); } private bool checkRequiredItem() { return true; } private bool checkVoid() { if (!requiresVoid) { return true; } return Moonstorm.Starstorm2.Items.VoidRock.invasionStage; } private bool checkRequiredArtifact() { if (!Object.op_Implicit((Object)(object)requiredArtifactDef)) { return true; } return RunArtifactManager.instance.IsArtifactEnabled(requiredArtifactDef); } private bool HopefullyTemporaryCheck() { if (!Object.op_Implicit((Object)(object)EventDirector.Instance)) { return true; } if (!base.requiredStateMachine.Equals("Nemesis")) { return true; } EntityStateMachine val = EntityStateMachine.FindByCustomName(((Component)EventDirector.Instance).gameObject, "Nemesis"); if (Object.op_Implicit((Object)(object)val)) { return val.IsInMainState(); } return false; } public override bool IsAvailable() { bool flag = ((EventCard)this).IsAvailable(); if (!flag) { return flag; } return checkRequiredItem() && HopefullyTemporaryCheck() && checkRequiredArtifact() && checkVoid(); } private void CreateVFXDictionary() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Invalid comparison between Unknown and I4 //IL_003f: Unknown result type (might be due to invalid IL or missing references) Dictionary dictionary = new Dictionary(); Dictionary dictionary2 = new Dictionary(); EventVFX[] array = this.eventVFX; foreach (EventVFX eventVFX in array) { if ((int)eventVFX.stageEnum == 1) { dictionary2[eventVFX.customStageName] = eventVFX.effectPrefab; } else { dictionary[eventVFX.stageEnum] = eventVFX.effectPrefab; } } vanillaStageToFXPrefab = new ReadOnlyDictionary(dictionary); customStageToFXPrefab = new ReadOnlyDictionary(dictionary2); this.eventVFX = Array.Empty(); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [R2APISubmoduleDependency(new string[] { "DotAPI", "PrefabAPI", "NetworkingAPI" })] [BepInPlugin("com.TeamMoonstorm.Starstorm2", "Starstorm 2", "0.6.6")] public class Starstorm : BaseUnityPlugin { internal const string guid = "com.TeamMoonstorm.Starstorm2"; internal const string modName = "Starstorm 2"; internal const string version = "0.6.6"; public static Starstorm instance; public static PluginInfo pluginInfo; public static bool DEBUG; public static bool ScepterInstalled; public static bool RiskyModInstalled; public static bool GOTCEInstalled; public static bool StageAesthInstalled; public void Awake() { instance = this; pluginInfo = ((BaseUnityPlugin)this).Info; SS2Log.logger = ((BaseUnityPlugin)this).Logger; new SS2Assets().Init(); if (!Object.op_Implicit((Object)(object)SS2Assets.LoadAsset("spike", SS2Bundle.Main))) { SS2Log.Fatal("Spike not found :c", 49, "Awake"); Object.Destroy((Object)(object)this); return; } new SS2Config().Init(); ((ContentLoader)new SS2Content()).Init(); new SS2Language().Init(); ConfigurableFieldManager.AddMod((BaseUnityPlugin)(object)this); NetworkingAPI.RegisterMessageType(); } private void Start() { SoundBankManager.Init(); SetupModCompat(); } private void SetupModCompat() { ScepterInstalled = Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter"); RiskyModInstalled = Chainloader.PluginInfos.ContainsKey("com.RiskyLives.RiskyMod"); GOTCEInstalled = Chainloader.PluginInfos.ContainsKey("com.TheBestAssociatedLargelyLudicrousSillyheadGroup.GOTCE"); StageAesthInstalled = Chainloader.PluginInfos.ContainsKey("com.HIFU.StageAesthetic"); } } } namespace Moonstorm.Starstorm2.PostProcess { [Serializable] [PostProcess(/*Could not decode attribute arguments.*/)] public sealed class SS2RampFog : PostProcessEffectSettings { [Range(0f, 1f)] [Tooltip("Fog intensity.")] public FloatParameter fogIntensity; [Range(0f, 20f)] [Tooltip("Fog Power")] public FloatParameter fogPower; [Range(-1f, 1f)] [Tooltip("The zero value for the fog depth remap.")] public FloatParameter fogZero; [Tooltip("The one value for the fog depth remap.")] [Range(-1f, 1f)] public FloatParameter fogOne; [Tooltip("The world position value where the height fog begins.")] [Range(-100f, 100f)] public FloatParameter fogHeightStart; [Tooltip("The world position value where the height fog ends.")] [Range(-100f, 600f)] public FloatParameter fogHeightEnd; [Range(0f, 5f)] [Tooltip("The overall strength of the height fog.")] public FloatParameter fogHeightIntensity; [Tooltip("Color of the fog at the beginning.")] public ColorParameter fogColorStart; [Tooltip("Color of the fog at the middle.")] public ColorParameter fogColorMid; [Tooltip("Color of the fog at the end.")] public ColorParameter fogColorEnd; [Tooltip("How much of the skybox will leak through?")] [Range(0f, 1f)] public FloatParameter skyboxStrength; public SS2RampFog() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0016: Expected O, but got Unknown //IL_0017: 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_0027: Expected O, but got Unknown //IL_002c: Expected O, but got Unknown //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_003d: Expected O, but got Unknown //IL_0042: Expected O, but got Unknown //IL_0043: 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_0053: Expected O, but got Unknown //IL_0058: Expected O, but got Unknown //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_006e: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown //IL_0084: Expected O, but got Unknown //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) //IL_0095: Expected O, but got Unknown //IL_009a: Expected O, but got Unknown //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_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown //IL_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_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown //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_00ed: Expected O, but got Unknown //IL_00f2: Expected O, but got Unknown FloatParameter val = new FloatParameter(); ((ParameterOverride)val).value = 0.5f; fogIntensity = val; FloatParameter val2 = new FloatParameter(); ((ParameterOverride)val2).value = 1f; fogPower = val2; FloatParameter val3 = new FloatParameter(); ((ParameterOverride)val3).value = 0f; fogZero = val3; FloatParameter val4 = new FloatParameter(); ((ParameterOverride)val4).value = 1f; fogOne = val4; FloatParameter val5 = new FloatParameter(); ((ParameterOverride)val5).value = 0f; fogHeightStart = val5; FloatParameter val6 = new FloatParameter(); ((ParameterOverride)val6).value = 100f; fogHeightEnd = val6; FloatParameter val7 = new FloatParameter(); ((ParameterOverride)val7).value = 0f; fogHeightIntensity = val7; ColorParameter val8 = new ColorParameter(); ((ParameterOverride)val8).value = Color.white; fogColorStart = val8; ColorParameter val9 = new ColorParameter(); ((ParameterOverride)val9).value = Color.white; fogColorMid = val9; ColorParameter val10 = new ColorParameter(); ((ParameterOverride)val10).value = Color.white; fogColorEnd = val10; FloatParameter val11 = new FloatParameter(); ((ParameterOverride)val11).value = 0f; skyboxStrength = val11; ((PostProcessEffectSettings)this)..ctor(); } } public sealed class SS2RampFogRenderer : PostProcessEffectRenderer { public override void Render(PostProcessRenderContext context) { //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0152: 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_0189: Unknown result type (might be due to invalid IL or missing references) PropertySheet val = context.propertySheets.Get(Shader.Find("Hidden/PostProcess/RampFog")); if (val != null) { val.properties.SetFloat("_FogIntensity", ParameterOverride.op_Implicit((ParameterOverride)(object)base.settings.fogIntensity)); val.properties.SetFloat("_FogPower", ParameterOverride.op_Implicit((ParameterOverride)(object)base.settings.fogPower)); val.properties.SetFloat("_FogZero", ParameterOverride.op_Implicit((ParameterOverride)(object)base.settings.fogZero)); val.properties.SetFloat("_FogOne", ParameterOverride.op_Implicit((ParameterOverride)(object)base.settings.fogOne)); val.properties.SetFloat("_FogHeightStart", ParameterOverride.op_Implicit((ParameterOverride)(object)base.settings.fogHeightStart)); val.properties.SetFloat("_FogHeightEnd", ParameterOverride.op_Implicit((ParameterOverride)(object)base.settings.fogHeightEnd)); val.properties.SetFloat("_FogHeightIntensity", ParameterOverride.op_Implicit((ParameterOverride)(object)base.settings.fogHeightIntensity)); val.properties.SetColor("_FogColorStart", ParameterOverride.op_Implicit((ParameterOverride)(object)base.settings.fogColorStart)); val.properties.SetColor("_FogColorMid", ParameterOverride.op_Implicit((ParameterOverride)(object)base.settings.fogColorMid)); val.properties.SetColor("_FogColorEnd", ParameterOverride.op_Implicit((ParameterOverride)(object)base.settings.fogColorEnd)); val.properties.SetFloat("_SkyboxStrength", ParameterOverride.op_Implicit((ParameterOverride)(object)base.settings.skyboxStrength)); RuntimeUtilities.BlitFullscreenTriangle(context.command, context.source, context.destination, val, 0, false, (Rect?)null); } else { SS2Log.Info("SS2RampFogRenderer property sheet was null"); } } } [Serializable] [PostProcess(/*Could not decode attribute arguments.*/)] public sealed class SS2SobelOutline : PostProcessEffectSettings { [Tooltip("The intensity of the outline.")] [Range(0f, 5f)] public FloatParameter outlineIntensity; [Range(0f, 10f)] [Tooltip("The falloff of the outline.")] public FloatParameter outlineScale; public SS2SobelOutline() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0016: Expected O, but got Unknown //IL_0017: 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_0027: Expected O, but got Unknown //IL_002c: Expected O, but got Unknown FloatParameter val = new FloatParameter(); ((ParameterOverride)val).value = 0.5f; outlineIntensity = val; FloatParameter val2 = new FloatParameter(); ((ParameterOverride)val2).value = 1f; outlineScale = val2; ((PostProcessEffectSettings)this)..ctor(); } } public sealed class SS2SobelOutlineRenderer : PostProcessEffectRenderer { public override void Render(PostProcessRenderContext context) { //IL_0060: 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) PropertySheet val = context.propertySheets.Get(Shader.Find("Hidden/PostProcess/SobelOutline")); if (val != null) { val.properties.SetFloat("_OutlineIntensity", ParameterOverride.op_Implicit((ParameterOverride)(object)base.settings.outlineIntensity)); val.properties.SetFloat("_OutlineScale", ParameterOverride.op_Implicit((ParameterOverride)(object)base.settings.outlineScale)); RuntimeUtilities.BlitFullscreenTriangle(context.command, context.source, context.destination, val, 0, false, (Rect?)null); } else { SS2Log.Info("SS2RampFogRenderer property sheet was null"); } } } [Serializable] [PostProcess(/*Could not decode attribute arguments.*/)] public sealed class SS2SobelRain : PostProcessEffectSettings { [Range(0f, 100f)] [Tooltip("The intensity of the rain.")] public FloatParameter rainIntensity; [Range(0f, 10f)] [Tooltip("The falloff of the outline. Higher values means it relies less on the sobel.")] public FloatParameter outlineScale; [Tooltip("The density of rain.")] [Range(0f, 1f)] public FloatParameter rainDensity; public TextureParameter rainTexture; public ColorParameter rainColor; public SS2SobelRain() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0016: Expected O, but got Unknown //IL_0017: 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_0027: Expected O, but got Unknown //IL_002c: Expected O, but got Unknown //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_003d: Expected O, but got Unknown //IL_0042: Expected O, but got Unknown //IL_0043: 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_004f: Expected O, but got Unknown //IL_0054: Expected O, but got Unknown //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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 FloatParameter val = new FloatParameter(); ((ParameterOverride)val).value = 0.5f; rainIntensity = val; FloatParameter val2 = new FloatParameter(); ((ParameterOverride)val2).value = 1f; outlineScale = val2; FloatParameter val3 = new FloatParameter(); ((ParameterOverride)val3).value = 1f; rainDensity = val3; TextureParameter val4 = new TextureParameter(); ((ParameterOverride)val4).value = null; rainTexture = val4; ColorParameter val5 = new ColorParameter(); ((ParameterOverride)val5).value = Color.white; rainColor = val5; ((PostProcessEffectSettings)this)..ctor(); } } public sealed class SS2SobelRainRenderer : PostProcessEffectRenderer { public override void Render(PostProcessRenderContext context) { //IL_00b2: 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_00c9: Unknown result type (might be due to invalid IL or missing references) PropertySheet val = context.propertySheets.Get(Shader.Find("Hidden/PostProcess/SobelRain")); if (val != null) { val.properties.SetFloat("_RainIntensity", ParameterOverride.op_Implicit((ParameterOverride)(object)base.settings.rainIntensity)); val.properties.SetFloat("_OutlineScale", ParameterOverride.op_Implicit((ParameterOverride)(object)base.settings.outlineScale)); val.properties.SetFloat("_RainDensity", ParameterOverride.op_Implicit((ParameterOverride)(object)base.settings.rainDensity)); val.properties.SetTexture("_RainTexture", ParameterOverride.op_Implicit((ParameterOverride)(object)base.settings.rainTexture)); val.properties.SetColor("_RainColor", ParameterOverride.op_Implicit((ParameterOverride)(object)base.settings.rainColor)); RuntimeUtilities.BlitFullscreenTriangle(context.command, context.source, context.destination, val, 0, false, (Rect?)null); } else { SS2Log.Info("SS2RampFogRenderer property sheet was null"); } } } } namespace Moonstorm.Starstorm2.Unlocks { public abstract class GenericMasteryAchievement : BaseAchievement { public virtual float RequiredDifficultyCoefficient { get; set; } public virtual CharacterBody RequiredCharacterBody { get; set; } public GenericMasteryAchievement(float requiredDifficultyCoef, CharacterBody requiredCharBody) { RequiredDifficultyCoefficient = requiredDifficultyCoef; RequiredCharacterBody = requiredCharBody; } public GenericMasteryAchievement() { } public override void OnBodyRequirementMet() { ((BaseAchievement)this).OnBodyRequirementMet(); Run.onClientGameOverGlobal += OnClientGameOverGlobal; } public override void OnBodyRequirementBroken() { Run.onClientGameOverGlobal -= OnClientGameOverGlobal; ((BaseAchievement)this).OnBodyRequirementBroken(); } private void OnClientGameOverGlobal(Run run, RunReport runReport) { //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_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Invalid comparison between Unknown and I4 //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Invalid comparison between Unknown and I4 if (Object.op_Implicit((Object)(object)runReport.gameEnding) && runReport.gameEnding.isWin) { DifficultyIndex val = runReport.ruleBook.FindDifficulty(); DifficultyDef difficultyDef = DifficultyCatalog.GetDifficultyDef(val); if ((difficultyDef.countsAsHardMode && difficultyDef.scalingValue >= RequiredDifficultyCoefficient) || ((int)val >= 3 && (int)val <= 10) || difficultyDef.nameToken == "INFERNO_NAME") { ((BaseAchievement)this).Grant(); } } } public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) return RequiredCharacterBody.bodyIndex; } } } namespace Moonstorm.Starstorm2.Unlocks.VanillaSurvivors { public sealed class CaptainGrandMasteryUnlockable : UnlockableBase { public sealed class CaptainGrandMasteryAchievement : GenericMasteryAchievement { public override float RequiredDifficultyCoefficient { get; set; } = 3.5f; public override CharacterBody RequiredCharacterBody { get; set; } = Resources.Load("prefabs/characterbodies/captainbody").GetComponent(); } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skin.captain.grandmastery", SS2Bundle.Vanilla); } public sealed class CommandoGrandMasteryUnlockable : UnlockableBase { public sealed class CommandoGrandMasteryAchievement : GenericMasteryAchievement { public override float RequiredDifficultyCoefficient { get; set; } = 3.5f; public override CharacterBody RequiredCharacterBody { get; set; } = Resources.Load("prefabs/characterbodies/commandobody").GetComponent(); } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skin.commando.grandmastery", SS2Bundle.Vanilla); } public sealed class CommandoNemesisSkinUnlockable : UnlockableBase { public sealed class CommandoNemesisSkinAchievement : BaseAchievement { private class CommandoNemesisSkinServerAchievement : BaseServerAchievement { public BodyIndex nemCommandoBodyIndex { get { //IL_001b: Unknown result type (might be due to invalid IL or missing references) GameObject val = SS2Assets.LoadAsset("NemCommandoBody", SS2Bundle.NemCommando); if (Object.op_Implicit((Object)(object)val)) { return val.GetComponent().bodyIndex; } return (BodyIndex)(-1); } } public BodyIndex commandoBodyIndex { get { //IL_0019: Unknown result type (might be due to invalid IL or missing references) GameObject bodyPrefab = Survivors.Commando.bodyPrefab; if (Object.op_Implicit((Object)(object)bodyPrefab)) { return bodyPrefab.GetComponent().bodyIndex; } return (BodyIndex)(-1); } } public override void OnInstall() { ((BaseServerAchievement)this).OnInstall(); GenericNemesisEvent.onNemesisDefeatedGlobal += OnNemCommandoDefeated; } public override void OnUninstall() { GenericNemesisEvent.onNemesisDefeatedGlobal -= OnNemCommandoDefeated; ((BaseServerAchievement)this).OnUninstall(); } private void OnNemCommandoDefeated(CharacterBody obj) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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) if (obj.bodyIndex == nemCommandoBodyIndex && ((BaseServerAchievement)this).networkUser.GetCurrentBody().bodyIndex == commandoBodyIndex) { ((BaseServerAchievement)this).Grant(); } } } public override void OnInstall() { ((BaseAchievement)this).OnInstall(); ((BaseAchievement)this).SetServerTracked(true); } public override void OnUninstall() { ((BaseAchievement)this).OnUninstall(); } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skin.commando.nemesisskin", SS2Bundle.Vanilla); } public class CrocoGrandMasteryUnlockable : UnlockableBase { public sealed class CrocoGrandMasteryAchievement : GenericMasteryAchievement { public override float RequiredDifficultyCoefficient { get; set; } = 3.5f; public override CharacterBody RequiredCharacterBody { get; set; } = Resources.Load("prefabs/characterbodies/crocobody").GetComponent(); } public override MSUnlockableDef UnlockableDef => SS2Assets.LoadAsset("ss2.skin.croco.grandmastery", SS2Bundle.Vanilla); } public sealed class HuntressGrandMasteryUnlockable : UnlockableBase { public sealed class HuntressGrandMasteryAchievement : GenericMasteryAchievement { public override float RequiredDifficultyCoefficient { get; set; } = 3.5f; public override CharacterBody RequiredCharacterBody { get; set; } = Resources.Load("prefabs/characterbodies/huntressbody").GetComponent(); } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skin.huntress.grandmastery", SS2Bundle.Vanilla); } public sealed class MercenaryNemesisSkinUnlockable : UnlockableBase { public sealed class MercenaryNemesisSkinAchievement : BaseAchievement { private class MercenaryNemesisSkinServerAchievement : BaseServerAchievement { public BodyIndex nemMercenaryBodyIndex { get { //IL_001b: Unknown result type (might be due to invalid IL or missing references) GameObject val = SS2Assets.LoadAsset("NemMercBody", SS2Bundle.NemMercenary); if (Object.op_Implicit((Object)(object)val)) { return val.GetComponent().bodyIndex; } return (BodyIndex)(-1); } } public BodyIndex mercenaryBodyIndex { get { //IL_0019: Unknown result type (might be due to invalid IL or missing references) GameObject bodyPrefab = Survivors.Merc.bodyPrefab; if (Object.op_Implicit((Object)(object)bodyPrefab)) { return bodyPrefab.GetComponent().bodyIndex; } return (BodyIndex)(-1); } } public override void OnInstall() { ((BaseServerAchievement)this).OnInstall(); GenericNemesisEvent.onNemesisDefeatedGlobal += OnNemMercenaryDefeated; } public override void OnUninstall() { GenericNemesisEvent.onNemesisDefeatedGlobal -= OnNemMercenaryDefeated; ((BaseServerAchievement)this).OnUninstall(); } private void OnNemMercenaryDefeated(CharacterBody obj) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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) if (obj.bodyIndex == nemMercenaryBodyIndex && ((BaseServerAchievement)this).networkUser.GetCurrentBody().bodyIndex == mercenaryBodyIndex) { ((BaseServerAchievement)this).Grant(); } } } public override void OnInstall() { ((BaseAchievement)this).OnInstall(); ((BaseAchievement)this).SetServerTracked(true); } public override void OnUninstall() { ((BaseAchievement)this).OnUninstall(); } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skin.mercenary.nemesisskin", SS2Bundle.Vanilla); } public sealed class ToolbotGrandMasteryUnlockable : UnlockableBase { public sealed class ToolbotGrandMasteryAchievement : GenericMasteryAchievement { public override float RequiredDifficultyCoefficient { get; set; } = 3.5f; public override CharacterBody RequiredCharacterBody { get; set; } = Resources.Load("prefabs/characterbodies/toolbotbody").GetComponent(); } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skin.toolbot.grandmastery", SS2Bundle.Vanilla); } } namespace Moonstorm.Starstorm2.Unlocks.Nemmando { public sealed class NemmandoBossAttackUnlockable : UnlockableBase { public sealed class NemmandoBossAttackAchievement : BaseAchievement { public BodyIndex LookUpRequiredBodyIndex() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("NemmandoBody"); } public override void OnInstall() { } private void Check(orig_AddBuff_BuffIndex orig, CharacterBody self, BuffIndex buffType) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)self)) { self.GetBuffCount(SS2Content.Buffs.BuffGouge); _ = 10; } orig.Invoke(self, buffType); } public override void OnUninstall() { } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skill.nemmando.bossattack", SS2Bundle.Nemmando); public override void Initialize() { ((UnlockableBase)this).AddRequiredType(); } } public sealed class NemmandoGrandMasteryUnlockable : UnlockableBase { public sealed class NemmandoGrandMasteryAchievement : GenericMasteryAchievement { public override float RequiredDifficultyCoefficient { get; set; } = 3.5f; public override CharacterBody RequiredCharacterBody { get; set; } = SS2Assets.LoadAsset("NemmandoBody", SS2Bundle.Nemmando).GetComponent(); } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skin.nemmando.grandmastery", SS2Bundle.Nemmando); } public sealed class NemmandoMasteryUnlockable : UnlockableBase { public sealed class NemmandoMasteryAchievement : GenericMasteryAchievement { public override float RequiredDifficultyCoefficient { get; set; } = 3f; public override CharacterBody RequiredCharacterBody { get; set; } = SS2Assets.LoadAsset("NemmandoBody", SS2Bundle.Nemmando).GetComponent(); } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skin.nemmando.mastery", SS2Bundle.Nemmando); } public sealed class NemmandoSingleTapUnlockable : UnlockableBase { public sealed class NemmandoSingleTapAchievement : BaseAchievement { public BodyIndex NemmandoBodyIndex { get { //IL_001a: Unknown result type (might be due to invalid IL or missing references) GameObject val = SS2Assets.LoadAsset("NemmandoBody", SS2Bundle.Nemmando); if (Object.op_Implicit((Object)(object)val)) { return val.GetComponent().bodyIndex; } return (BodyIndex)(-1); } } public override BodyIndex LookUpRequiredBodyIndex() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("NemmandoBody"); } public override void OnInstall() { } private void Check(CharacterBody obj) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) if (obj.bodyIndex == NemmandoBodyIndex && ((BaseAchievement)this).meetsBodyRequirement) { ((BaseAchievement)this).Grant(); } } public override void OnUninstall() { } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skill.nemmando.singletap", SS2Bundle.Nemmando); public override void Initialize() { ((UnlockableBase)this).AddRequiredType(); } } } namespace Moonstorm.Starstorm2.Unlocks.NemMercenary { public sealed class NemMercenaryCloneUnlock : UnlockableBase { public sealed class NemMercenaryCloneAchievement : BaseAchievement { private class NemMercenaryCloneServerAchievement : BaseServerAchievement { public BodyIndex nemMercBodyIndex { get { //IL_001b: Unknown result type (might be due to invalid IL or missing references) GameObject val = SS2Assets.LoadAsset("NemMercBody", SS2Bundle.NemMercenary); if (Object.op_Implicit((Object)(object)val)) { return val.GetComponent().bodyIndex; } return (BodyIndex)(-1); } } private void Check(orig_OnInteractionBegin orig, PurchaseInteraction self, Interactor activator) { //IL_002a: 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) orig.Invoke(self, activator); if (self.displayNameToken.Equals("SS2_DRONE_CLONE_INTERACTABLE_NAME")) { CharacterBody component = ((Component)activator).GetComponent(); if (Object.op_Implicit((Object)(object)component) && component.bodyIndex == nemMercBodyIndex && (Object)(object)((BaseServerAchievement)this).networkUser.GetCurrentBody() == (Object)(object)component) { ((BaseServerAchievement)this).Grant(); } } } public override void OnInstall() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown ((BaseServerAchievement)this).OnInstall(); PurchaseInteraction.OnInteractionBegin += new hook_OnInteractionBegin(Check); } public override void OnUninstall() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown ((BaseServerAchievement)this).OnUninstall(); PurchaseInteraction.OnInteractionBegin -= new hook_OnInteractionBegin(Check); } } public override void OnInstall() { ((BaseAchievement)this).OnInstall(); SS2Log.Warning("NemMercenaryCloneUnlock"); ((BaseAchievement)this).SetServerTracked(true); } public override void OnUninstall() { ((BaseAchievement)this).OnUninstall(); } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skill.nemmercenary.clone", SS2Bundle.NemMercenary); } public sealed class NemMercenaryGrandMasteryUnlockable : UnlockableBase { public sealed class NemMercenaryGrandMasteryAchievement : GenericMasteryAchievement { public override float RequiredDifficultyCoefficient { get; set; } = 3.5f; public override CharacterBody RequiredCharacterBody { get; set; } = SS2Assets.LoadAsset("NemMercBody", SS2Bundle.NemMercenary).GetComponent(); } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skin.nemmerc.grandmastery", SS2Bundle.NemMercenary); } public sealed class NemMercenaryKnifeUnlock : UnlockableBase { public sealed class NemMercenaryKnifeAchievement : BaseAchievement { public BodyIndex nemMercBodyIndex { get { //IL_001b: Unknown result type (might be due to invalid IL or missing references) GameObject val = SS2Assets.LoadAsset("NemMercBody", SS2Bundle.NemMercenary); if (Object.op_Implicit((Object)(object)val)) { return val.GetComponent().bodyIndex; } return (BodyIndex)(-1); } } public override void OnInstall() { ((BaseAchievement)this).OnInstall(); GenericNemesisEvent.onNemesisDefeatedGlobal += OnNemMercenaryDefeated; } public override void OnUninstall() { GenericNemesisEvent.onNemesisDefeatedGlobal -= OnNemMercenaryDefeated; ((BaseAchievement)this).OnUninstall(); } private void OnNemMercenaryDefeated(CharacterBody obj) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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) if (obj.bodyIndex != nemMercBodyIndex && ((BaseAchievement)this).localUser.cachedBody.bodyIndex == nemMercBodyIndex) { ((BaseAchievement)this).Grant(); } } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skill.nemmercenary.knife", SS2Bundle.NemMercenary); } public sealed class NemMercenaryMasteryUnlockable : UnlockableBase { public sealed class NemMercenaryMasteryAchievement : GenericMasteryAchievement { public override float RequiredDifficultyCoefficient { get; set; } = 3f; public override CharacterBody RequiredCharacterBody { get; set; } = SS2Assets.LoadAsset("NemMercBody", SS2Bundle.NemMercenary).GetComponent(); } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skin.nemmerc.mastery", SS2Bundle.NemMercenary); } public sealed class NemMercenaryNemesisSkinUnlockable : UnlockableBase { public sealed class NemMercenaryNemesisSkinAchievement : BaseAchievement { private class NemMercenaryNemesisSkinServerAchievement : BaseServerAchievement { public BodyIndex nemMercBodyIndex { get { //IL_001b: Unknown result type (might be due to invalid IL or missing references) GameObject val = SS2Assets.LoadAsset("NemMercBody", SS2Bundle.NemMercenary); if (Object.op_Implicit((Object)(object)val)) { return val.GetComponent().bodyIndex; } return (BodyIndex)(-1); } } public override void OnInstall() { ((BaseServerAchievement)this).OnInstall(); GenericNemesisEvent.onNemesisDefeatedGlobal += OnNemMercenaryDefeated; } public override void OnUninstall() { GenericNemesisEvent.onNemesisDefeatedGlobal -= OnNemMercenaryDefeated; ((BaseServerAchievement)this).OnUninstall(); } private void OnNemMercenaryDefeated(CharacterBody obj) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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) if (obj.bodyIndex == nemMercBodyIndex && ((BaseServerAchievement)this).networkUser.GetCurrentBody().bodyIndex == nemMercBodyIndex) { ((BaseServerAchievement)this).Grant(); } } } public override void OnInstall() { ((BaseAchievement)this).OnInstall(); ((BaseAchievement)this).SetServerTracked(true); } public override void OnUninstall() { ((BaseAchievement)this).OnUninstall(); } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skin.nemmerc.nemesisskin", SS2Bundle.NemMercenary); } public sealed class NemMercenarySlideUnlock : UnlockableBase { public sealed class NemMercenarySlideAchievement : BaseAchievement { private CharacterMotor motor; private bool failed; private bool characterOk; private ToggleAction groundCheck; private ToggleAction teleporterCheck; private bool hasEverTouchedGround; public static float gracePeriod = 0.5f; private float graceTimer; public BodyIndex nemMercBodyIndex { get { //IL_001b: Unknown result type (might be due to invalid IL or missing references) GameObject val = SS2Assets.LoadAsset("NemMercBody", SS2Bundle.NemMercenary); if (Object.op_Implicit((Object)(object)val)) { return val.GetComponent().bodyIndex; } return (BodyIndex)(-1); } } public override BodyIndex LookUpRequiredBodyIndex() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return nemMercBodyIndex; } private void SubscribeGroundCheck() { RoR2Application.onFixedUpdate += FixedUpdateCheckGrounded; } private void UnsubscribeGroundCheck() { RoR2Application.onFixedUpdate -= FixedUpdateCheckGrounded; } private void SubscribeTeleporterCheck() { TeleporterInteraction.onTeleporterChargedGlobal += CheckTeleporter; } private void UnsubscribeTeleporterCheck() { TeleporterInteraction.onTeleporterChargedGlobal -= CheckTeleporter; } private void OnMostRecentSceneDefChanged(SceneDef sceneDef) { failed = false; hasEverTouchedGround = false; graceTimer = gracePeriod; } private void FixedUpdateCheckGrounded() { if (!hasEverTouchedGround && Object.op_Implicit((Object)(object)motor) && motor.isGrounded) { hasEverTouchedGround = true; } if (!hasEverTouchedGround || !Object.op_Implicit((Object)(object)motor)) { return; } if (!motor.isGrounded) { graceTimer -= Time.fixedDeltaTime; if (graceTimer <= 0f) { Fail(); } } else { graceTimer = gracePeriod; } } private void CheckTeleporter(TeleporterInteraction teleporterInteraction) { if (characterOk && !failed) { ((BaseAchievement)this).Grant(); } } public override void OnBodyRequirementMet() { ((BaseAchievement)this).OnBodyRequirementMet(); characterOk = true; } public override void OnBodyRequirementBroken() { ((BaseAchievement)this).OnBodyRequirementMet(); characterOk = false; Fail(); } private void Fail() { failed = true; groundCheck.SetActive(false); teleporterCheck.SetActive(false); } private void OnBodyChanged() { if (characterOk && !failed && Object.op_Implicit((Object)(object)((BaseAchievement)this).localUser.cachedBody)) { motor = ((BaseAchievement)this).localUser.cachedBody.characterMotor; groundCheck.SetActive(true); teleporterCheck.SetActive(true); } } public override void OnInstall() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown ((BaseAchievement)this).OnInstall(); groundCheck = new ToggleAction((Action)SubscribeGroundCheck, (Action)UnsubscribeGroundCheck); teleporterCheck = new ToggleAction((Action)SubscribeTeleporterCheck, (Action)UnsubscribeTeleporterCheck); ((BaseAchievement)this).localUser.onBodyChanged += OnBodyChanged; SceneCatalog.onMostRecentSceneDefChanged += OnMostRecentSceneDefChanged; } public override void OnUninstall() { ((BaseAchievement)this).localUser.onBodyChanged -= OnBodyChanged; groundCheck.Dispose(); teleporterCheck.Dispose(); SceneCatalog.onMostRecentSceneDefChanged -= OnMostRecentSceneDefChanged; ((BaseAchievement)this).OnUninstall(); } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skill.nemmerc.slide", SS2Bundle.NemMercenary); } public sealed class NemMercenaryUnlockable : UnlockableBase { public sealed class NemMercenaryAchievement : BaseAchievement { private class NemMercenaryUnlockableServerAchievement : BaseServerAchievement { public BodyIndex nemMercBodyIndex { get { //IL_001b: Unknown result type (might be due to invalid IL or missing references) GameObject val = SS2Assets.LoadAsset("NemMercBody", SS2Bundle.NemMercenary); if (Object.op_Implicit((Object)(object)val)) { return val.GetComponent().bodyIndex; } return (BodyIndex)(-1); } } public override void OnInstall() { ((BaseServerAchievement)this).OnInstall(); GenericNemesisEvent.onNemesisDefeatedGlobal += OnNemMercenaryDefeated; } public override void OnUninstall() { GenericNemesisEvent.onNemesisDefeatedGlobal -= OnNemMercenaryDefeated; ((BaseServerAchievement)this).OnUninstall(); } private void OnNemMercenaryDefeated(CharacterBody obj) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) if (obj.bodyIndex == nemMercBodyIndex) { ((BaseServerAchievement)this).Grant(); } } } public override void OnInstall() { ((BaseAchievement)this).OnInstall(); ((BaseAchievement)this).SetServerTracked(true); } public override void OnUninstall() { ((BaseAchievement)this).OnUninstall(); } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.survivor.nemmerc", SS2Bundle.NemMercenary); } } namespace Moonstorm.Starstorm2.Unlocks.NemCommando { public sealed class NemCommandoBeamUnlock : UnlockableBase { public sealed class NemCommandoBeamAchievement : BaseAchievement { private class NemCommandoBeamUnlockServerAchievement : BaseServerAchievement { public BodyIndex nemCommandoBodyIndex { get { //IL_001b: Unknown result type (might be due to invalid IL or missing references) GameObject val = SS2Assets.LoadAsset("NemCommandoBody", SS2Bundle.NemCommando); if (Object.op_Implicit((Object)(object)val)) { return val.GetComponent().bodyIndex; } return (BodyIndex)(-1); } } public override void OnInstall() { ((BaseServerAchievement)this).OnInstall(); RoR2Application.onUpdate += CheckBleedChance; } public override void OnUninstall() { RoR2Application.onUpdate -= CheckBleedChance; ((BaseServerAchievement)this).OnUninstall(); } private void CheckBleedChance() { //IL_002c: 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) if ((Object)(object)((BaseServerAchievement)this).networkUser != (Object)null && (Object)(object)((BaseServerAchievement)this).networkUser.GetCurrentBody() != (Object)null && ((BaseServerAchievement)this).networkUser.GetCurrentBody().bodyIndex == nemCommandoBodyIndex && ((BaseServerAchievement)this).networkUser.GetCurrentBody().bleedChance >= 100f) { ((BaseServerAchievement)this).Grant(); } } } public override void OnInstall() { ((BaseAchievement)this).OnInstall(); ((BaseAchievement)this).SetServerTracked(true); } public override void OnUninstall() { ((BaseAchievement)this).OnUninstall(); } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skill.nemcommando.swordbeam", SS2Bundle.NemCommando); } public sealed class NemCommandoDecisiveUnlock : UnlockableBase { public sealed class NemCommandoDecisiveAchievement : BaseAchievement { private class NemCommandoDecisiveServerAchievement : BaseServerAchievement { public BodyIndex nemCommandoBodyIndex { get { //IL_001b: Unknown result type (might be due to invalid IL or missing references) GameObject val = SS2Assets.LoadAsset("NemCommandoBody", SS2Bundle.NemCommando); if (Object.op_Implicit((Object)(object)val)) { return val.GetComponent().bodyIndex; } return (BodyIndex)(-1); } } public override void OnInstall() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown ((BaseServerAchievement)this).OnInstall(); CharacterBody.AddBuff_BuffIndex += new hook_AddBuff_BuffIndex(Check); } private void Check(orig_AddBuff_BuffIndex orig, CharacterBody self, BuffIndex buffType) { //IL_003b: 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_002c: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)self) && (float)self.GetBuffCount(SS2Content.Buffs.BuffGouge) >= 8f && ((BaseServerAchievement)this).networkUser.GetCurrentBody().bodyIndex == nemCommandoBodyIndex) { ((BaseServerAchievement)this).Grant(); } orig.Invoke(self, buffType); } public override void OnUninstall() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown ((BaseServerAchievement)this).OnUninstall(); CharacterBody.AddBuff_BuffIndex -= new hook_AddBuff_BuffIndex(Check); } } public override void OnInstall() { ((BaseAchievement)this).OnInstall(); ((BaseAchievement)this).SetServerTracked(true); } public override void OnUninstall() { ((BaseAchievement)this).OnUninstall(); } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skill.nemcommando.bossattack", SS2Bundle.NemCommando); } public sealed class NemCommandoGrandMasteryUnlockable : UnlockableBase { public sealed class NemCommandoGrandMasteryAchievement : GenericMasteryAchievement { public override float RequiredDifficultyCoefficient { get; set; } = 3.5f; public override CharacterBody RequiredCharacterBody { get; set; } = SS2Assets.LoadAsset("NemCommandoBody", SS2Bundle.NemCommando).GetComponent(); } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skin.nemcommando.grandmastery", SS2Bundle.NemCommando); } public sealed class NemCommandoMasteryUnlockable : UnlockableBase { public sealed class NemCommandoMasteryAchievement : GenericMasteryAchievement { public override float RequiredDifficultyCoefficient { get; set; } = 3f; public override CharacterBody RequiredCharacterBody { get; set; } = SS2Assets.LoadAsset("NemCommandoBody", SS2Bundle.NemCommando).GetComponent(); } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skin.nemcommando.mastery", SS2Bundle.NemCommando); } public sealed class NemCommandoNemesisSkinUnlockable : UnlockableBase { public sealed class NemCommandoNemesisSkinAchievement : BaseAchievement { private class NemCommandoNemesisSkinServerAchievement : BaseServerAchievement { public BodyIndex nemCommandoBodyIndex { get { //IL_001b: Unknown result type (might be due to invalid IL or missing references) GameObject val = SS2Assets.LoadAsset("NemCommandoBody", SS2Bundle.NemCommando); if (Object.op_Implicit((Object)(object)val)) { return val.GetComponent().bodyIndex; } return (BodyIndex)(-1); } } public override void OnInstall() { ((BaseServerAchievement)this).OnInstall(); GenericNemesisEvent.onNemesisDefeatedGlobal += OnNemCommandoDefeated; } public override void OnUninstall() { GenericNemesisEvent.onNemesisDefeatedGlobal -= OnNemCommandoDefeated; ((BaseServerAchievement)this).OnUninstall(); } private void OnNemCommandoDefeated(CharacterBody obj) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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) if (obj.bodyIndex == nemCommandoBodyIndex && ((BaseServerAchievement)this).networkUser.GetCurrentBody().bodyIndex == nemCommandoBodyIndex) { ((BaseServerAchievement)this).Grant(); } } } public override void OnInstall() { ((BaseAchievement)this).OnInstall(); ((BaseAchievement)this).SetServerTracked(true); } public override void OnUninstall() { ((BaseAchievement)this).OnUninstall(); } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skin.nemcommando.nemesisskin", SS2Bundle.NemCommando); } public sealed class NemCommandoUnlockable : UnlockableBase { public sealed class NemCommandoAchievement : BaseAchievement { private class NemCommandoUnlockableServerAchievement : BaseServerAchievement { public BodyIndex nemCommandoBodyIndex { get { //IL_001b: Unknown result type (might be due to invalid IL or missing references) GameObject val = SS2Assets.LoadAsset("NemCommandoBody", SS2Bundle.NemCommando); if (Object.op_Implicit((Object)(object)val)) { return val.GetComponent().bodyIndex; } return (BodyIndex)(-1); } } public override void OnInstall() { ((BaseServerAchievement)this).OnInstall(); GenericNemesisEvent.onNemesisDefeatedGlobal += OnNemCommandoDefeated; } public override void OnUninstall() { GenericNemesisEvent.onNemesisDefeatedGlobal -= OnNemCommandoDefeated; ((BaseServerAchievement)this).OnUninstall(); } private void OnNemCommandoDefeated(CharacterBody obj) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) if (obj.bodyIndex == nemCommandoBodyIndex) { ((BaseServerAchievement)this).Grant(); } } } public override void OnInstall() { ((BaseAchievement)this).OnInstall(); ((BaseAchievement)this).SetServerTracked(true); } public override void OnUninstall() { ((BaseAchievement)this).OnUninstall(); } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.survivor.nemcommando", SS2Bundle.NemCommando); } } namespace Moonstorm.Starstorm2.Unlocks.Executioner2 { [DisabledContent] public sealed class ElectrocutionerUnlockable : UnlockableBase { public sealed class ElectrocutionerAchievement : BaseAchievement { private class ElectrocutionerServerAchievement : BaseServerAchievement { private BodyIndex reminderBodyIndex; public override void OnInstall() { //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) ((BaseServerAchievement)this).OnInstall(); reminderBodyIndex = BodyCatalog.FindBodyIndex("ElectricWormBody"); GlobalEventManager.onCharacterDeathGlobal += ElectroTracker; } private void ElectroTracker(DamageReport damageReport) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Invalid comparison between Unknown and I4 if (damageReport.victimBodyIndex == reminderBodyIndex && ((BaseServerAchievement)this).IsCurrentBody(damageReport.attackerBody) && (int)damageReport.damageInfo.damageType == 262144) { ((BaseServerAchievement)this).Grant(); } } public override void OnUninstall() { GlobalEventManager.onCharacterDeathGlobal -= ElectroTracker; ((BaseServerAchievement)this).OnUninstall(); } } public override void OnInstall() { ((BaseAchievement)this).OnInstall(); ((BaseAchievement)this).SetServerTracked(true); } public override BodyIndex LookUpRequiredBodyIndex() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("Executioner2Body"); } public override void OnBodyRequirementMet() { ((BaseAchievement)this).OnBodyRequirementMet(); ((BaseAchievement)this).SetServerTracked(true); } public override void OnBodyRequirementBroken() { ((BaseAchievement)this).SetServerTracked(false); ((BaseAchievement)this).OnBodyRequirementBroken(); } public override void OnUninstall() { ((BaseAchievement)this).OnUninstall(); } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skin.executioner2.electro", SS2Bundle.Executioner2); } public sealed class Executioner2MasteryUnlockable : UnlockableBase { public sealed class Executioner2MasteryAchievement : GenericMasteryAchievement { public override float RequiredDifficultyCoefficient { get; set; } = 3f; public override CharacterBody RequiredCharacterBody { get; set; } = SS2Assets.LoadAsset("Executioner2Body", SS2Bundle.Executioner2).GetComponent(); } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skin.executioner2.mastery", SS2Bundle.Executioner2); } public sealed class Executioner2GrandMasteryUnlockable : UnlockableBase { public sealed class Executioner2GrandMasteryAchievement : GenericMasteryAchievement { public override float RequiredDifficultyCoefficient { get; set; } = 3.5f; public override CharacterBody RequiredCharacterBody { get; set; } = SS2Assets.LoadAsset("Executioner2Body", SS2Bundle.Executioner2).GetComponent(); } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skin.executioner2.grandmastery", SS2Bundle.Executioner2); } } namespace Moonstorm.Starstorm2.Unlocks.Executioner { public sealed class ExecutionerGrandMasteryUnlockable : UnlockableBase { public sealed class ExecutionerGrandMasteryAchievement : GenericMasteryAchievement { public override float RequiredDifficultyCoefficient { get; set; } = 3.5f; public override CharacterBody RequiredCharacterBody { get; set; } = SS2Assets.LoadAsset("ExecutionerBody", SS2Bundle.Executioner).GetComponent(); } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skin.executioner.grandmastery", SS2Bundle.Executioner); } public sealed class ExecutionerMasteryUnlockable : UnlockableBase { public sealed class ExecutionerMasteryAchievement : GenericMasteryAchievement { public override float RequiredDifficultyCoefficient { get; set; } = 3f; public override CharacterBody RequiredCharacterBody { get; set; } = SS2Assets.LoadAsset("ExecutionerBody", SS2Bundle.Executioner).GetComponent(); } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skin.executioner.mastery", SS2Bundle.Executioner); } public sealed class ExecutionerUnlockable : UnlockableBase { public sealed class ExecutionerAchievement : BaseAchievement { public override void OnInstall() { ((BaseAchievement)this).OnInstall(); GlobalEventManager.onCharacterDeathGlobal += TryUnlock; } public override void OnUninstall() { GlobalEventManager.onCharacterDeathGlobal -= TryUnlock; ((BaseAchievement)this).OnUninstall(); } private void TryUnlock(DamageReport damageReport) { CharacterMaster attackerMaster = damageReport.attackerMaster; if (Object.op_Implicit((Object)(object)attackerMaster) && Object.op_Implicit((Object)(object)attackerMaster.playerCharacterMasterController)) { CharacterBody victimBody = damageReport.victimBody; float damageDealt = damageReport.damageDealt; if (Object.op_Implicit((Object)(object)victimBody) && damageDealt >= victimBody.maxHealth * 10f && Object.op_Implicit((Object)(object)victimBody.master)) { ((BaseAchievement)this).Grant(); } } } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.survivor.executioner", SS2Bundle.Executioner); public override void Initialize() { ((UnlockableBase)this).AddRequiredType(); } } public sealed class ExecutionerWastelanderUnlockable : UnlockableBase { public sealed class ExecutionerWastelanderAchievement : BaseAchievement { public override BodyIndex LookUpRequiredBodyIndex() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("ExecutionerBody"); } public override void OnInstall() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown Opening.OnEnter += new hook_OnEnter(Check); } private void Check(orig_OnEnter orig, Opening self) { orig.Invoke(self); if (((BaseAchievement)this).meetsBodyRequirement) { ((BaseAchievement)this).Grant(); } } public override void OnUninstall() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown Opening.OnEnter -= new hook_OnEnter(Check); } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.skin.executioner.wastelander", SS2Bundle.Executioner); public override void Initialize() { ((UnlockableBase)this).AddRequiredType(); } } } namespace Moonstorm.Starstorm2.Unlocks.Chirr { public sealed class ChirrUnlockable : UnlockableBase { public sealed class ChirrAchievement : BaseAchievement { private class ChirrServerAchievement : BaseServerAchievement { public override void OnInstall() { ((BaseServerAchievement)this).OnInstall(); GlobalEventManager.onCharacterDeathGlobal += CheckEmpyrean; } private void CheckEmpyrean(DamageReport damageReport) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Invalid comparison between Unknown and I4 if ((int)damageReport.attackerTeamIndex == 1 && damageReport.victimIsElite && damageReport.victimBody.HasBuff(SS2Content.Buffs.bdEmpyrean)) { ((BaseServerAchievement)this).Grant(); } } public override void OnUninstall() { ((BaseServerAchievement)this).OnUninstall(); GlobalEventManager.onCharacterDeathGlobal -= CheckEmpyrean; } } public override void OnInstall() { ((BaseAchievement)this).OnInstall(); ((BaseAchievement)this).SetServerTracked(true); } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.survivor.chirr", SS2Bundle.Chirr); } } namespace Moonstorm.Starstorm2.Unlocks.Pickups { public sealed class GreaterWarbannerUnlockable : UnlockableBase { public sealed class GreaterWarbannerAchievement : BaseAchievement { private Inventory currentInventory; private PlayerCharacterMasterController currentMasterController; public override void OnInstall() { ((BaseAchievement)this).OnInstall(); ((BaseAchievement)this).localUser.onMasterChanged += OnMasterChanged; SetMasterController(((BaseAchievement)this).localUser.cachedMasterController); } public override void OnUninstall() { SetMasterController(null); ((BaseAchievement)this).localUser.onMasterChanged -= OnMasterChanged; ((BaseAchievement)this).OnUninstall(); } private void SetMasterController(PlayerCharacterMasterController newMasterController) { if (currentMasterController != newMasterController) { if (currentInventory != null) { currentInventory.onInventoryChanged -= OnInventoryChanged; } currentMasterController = newMasterController; PlayerCharacterMasterController obj = currentMasterController; object obj2; if (obj == null) { obj2 = null; } else { CharacterMaster master = obj.master; obj2 = ((master != null) ? master.inventory : null); } currentInventory = (Inventory)obj2; if (currentInventory != null) { currentInventory.onInventoryChanged += OnInventoryChanged; } } } private void OnInventoryChanged() { if (Object.op_Implicit((Object)(object)currentInventory)) { ItemDef wardOnLevel = Items.WardOnLevel; if (currentInventory.GetItemCount(wardOnLevel) >= 4) { ((BaseAchievement)this).Grant(); } } } private void OnMasterChanged() { SetMasterController(((BaseAchievement)this).localUser.cachedMasterController); } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.equip.greaterwarbanner", SS2Bundle.Equipments); public override void Initialize() { ((UnlockableBase)this).AddRequiredType(); } } [DisabledContent] public sealed class BloodTesterUnlockable : UnlockableBase { public sealed class BloodTesterAchievement : BaseAchievement { public float healthAccumulation; public override void OnInstall() { ((BaseAchievement)this).OnInstall(); HealthComponent.onCharacterHealServer += CheckHealth; } public override void OnUninstall() { HealthComponent.onCharacterHealServer -= CheckHealth; ((BaseAchievement)this).OnUninstall(); } private void CheckHealth(HealthComponent healthComponent, float healthAmount, ProcChainMask procChainMask) { if (((object)healthComponent.body).Equals((object?)((BaseAchievement)this).localUser.cachedBody) && !Run.instance.isRunStopwatchPaused) { if ((!Object.op_Implicit((Object)(object)TeleporterInteraction.instance) || !TeleporterInteraction.instance.isCharged) && healthComponent.health < healthComponent.body.maxHealth) { healthAccumulation += healthAmount; } if (healthAccumulation > 5000f) { ((BaseAchievement)this).Grant(); } } } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.item.bloodtester", SS2Bundle.Indev); public override void Initialize() { ((UnlockableBase)this).AddRequiredType(); } } public sealed class CoffeeBagUnlock : UnlockableBase { public sealed class CoffeeBagAchievement : BaseAchievement { public override void OnInstall() { ((BaseAchievement)this).OnInstall(); RoR2Application.onUpdate += CheckMovementAttackSpeed; } public override void OnUninstall() { RoR2Application.onUpdate -= CheckMovementAttackSpeed; ((BaseAchievement)this).OnUninstall(); } private void CheckMovementAttackSpeed() { if (((BaseAchievement)this).localUser != null && Object.op_Implicit((Object)(object)((BaseAchievement)this).localUser.cachedBody) && ((BaseAchievement)this).localUser.cachedBody.moveSpeed / ((BaseAchievement)this).localUser.cachedBody.baseMoveSpeed >= 2.5f && ((BaseAchievement)this).localUser.cachedBody.attackSpeed / ((BaseAchievement)this).localUser.cachedBody.baseAttackSpeed >= 2.5f) { ((BaseAchievement)this).Grant(); } } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.item.coffeebag", SS2Bundle.Items); public override void Initialize() { ((UnlockableBase)this).AddRequiredType(); } } public sealed class DiaryUnlockable : UnlockableBase { public sealed class DiaryAchievement : BaseAchievement { public override void OnInstall() { ((BaseAchievement)this).OnInstall(); GlobalEventManager.onCharacterLevelUp += CheckTeamLevel; } public override void OnUninstall() { GlobalEventManager.onCharacterLevelUp -= CheckTeamLevel; ((BaseAchievement)this).OnUninstall(); } private void CheckTeamLevel(CharacterBody characterBody) { //IL_000b: 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_0022: Invalid comparison between Unknown and I4 uint teamLevel = TeamManager.instance.GetTeamLevel(characterBody.teamComponent.teamIndex); if ((int)characterBody.teamComponent.teamIndex == 1 && teamLevel >= 20 && characterBody.isPlayerControlled) { ((BaseAchievement)this).Grant(); } } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.item.diary", SS2Bundle.Items); public override void Initialize() { ((UnlockableBase)this).AddRequiredType(); } } [DisabledContent] public sealed class ErraticGadgetUnlockable : UnlockableBase { public sealed class ErraticGadgetAchievement : BaseAchievement { private Inventory currentInventory; private PlayerCharacterMasterController currentMasterController; public static List CritItems = new List(); public override void OnInstall() { ((BaseAchievement)this).OnInstall(); ((BaseAchievement)this).localUser.onMasterChanged += OnMasterChanged; SetMasterController(((BaseAchievement)this).localUser.cachedMasterController); CritItems.Add(Items.CritGlasses); CritItems.Add(Items.AttackSpeedOnCrit); CritItems.Add(Items.HealOnCrit); CritItems.Add(Items.BleedOnHitAndExplode); if (Object.op_Implicit((Object)(object)SS2Content.Items.Needles)) { CritItems.Add(SS2Content.Items.Needles); } if (Object.op_Implicit((Object)(object)SS2Content.Items.GreenChocolate)) { CritItems.Add(SS2Content.Items.GreenChocolate); } if (Object.op_Implicit((Object)(object)SS2Content.Items.HuntersSigil)) { CritItems.Add(SS2Content.Items.HuntersSigil); } } public override void OnUninstall() { SetMasterController(null); ((BaseAchievement)this).localUser.onMasterChanged -= OnMasterChanged; ((BaseAchievement)this).OnUninstall(); } private void SetMasterController(PlayerCharacterMasterController newMasterController) { if (currentMasterController != newMasterController) { if (currentInventory != null) { currentInventory.onInventoryChanged -= OnInventoryChanged; } currentMasterController = newMasterController; PlayerCharacterMasterController obj = currentMasterController; object obj2; if (obj == null) { obj2 = null; } else { CharacterMaster master = obj.master; obj2 = ((master != null) ? master.inventory : null); } currentInventory = (Inventory)obj2; if (currentInventory != null) { currentInventory.onInventoryChanged += OnInventoryChanged; } } } private void OnInventoryChanged() { if (!Object.op_Implicit((Object)(object)currentInventory)) { return; } int num = 0; foreach (ItemDef critItem in CritItems) { int itemCount = currentInventory.GetItemCount(critItem); if (itemCount >= 1) { num += itemCount; } } if (num >= 10) { ((BaseAchievement)this).Grant(); } } private void OnMasterChanged() { SetMasterController(((BaseAchievement)this).localUser.cachedMasterController); } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.item.erraticgadget", SS2Bundle.Indev); public override void Initialize() { ((UnlockableBase)this).AddRequiredType(); } } [DisabledContent] public sealed class HottestSauceUnlockable : UnlockableBase { public sealed class HottestSauceAchievement : BaseAchievement { private Inventory currentInventory; private PlayerCharacterMasterController currentMasterController; public override void OnInstall() { ((BaseAchievement)this).OnInstall(); ((BaseAchievement)this).localUser.onMasterChanged += OnMasterChanged; SetMasterController(((BaseAchievement)this).localUser.cachedMasterController); } public override void OnUninstall() { SetMasterController(null); ((BaseAchievement)this).localUser.onMasterChanged -= OnMasterChanged; ((BaseAchievement)this).OnUninstall(); } private void SetMasterController(PlayerCharacterMasterController newMasterController) { if (currentMasterController != newMasterController) { if (currentInventory != null) { currentInventory.onInventoryChanged -= OnInventoryChanged; } currentMasterController = newMasterController; PlayerCharacterMasterController obj = currentMasterController; object obj2; if (obj == null) { obj2 = null; } else { CharacterMaster master = obj.master; obj2 = ((master != null) ? master.inventory : null); } currentInventory = (Inventory)obj2; if (currentInventory != null) { currentInventory.onInventoryChanged += OnInventoryChanged; } } } private void OnInventoryChanged() { if (!Object.op_Implicit((Object)(object)currentInventory)) { return; } List obj = new List { Items.FireRing, Items.ExplodeOnDeath, Items.IgniteOnKill }; int num = 0; foreach (ItemDef item in obj) { if (currentInventory.GetItemCount(item) >= 1) { num++; } } if (num >= 3) { ((BaseAchievement)this).Grant(); } } private void OnMasterChanged() { SetMasterController(((BaseAchievement)this).localUser.cachedMasterController); } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.item.hottestsauce", SS2Bundle.Indev); public override void Initialize() { ((UnlockableBase)this).AddRequiredType(); } } public sealed class HuntersSigilUnlockable : UnlockableBase { public sealed class HuntersSigilAchievement : BaseAchievement { public override void OnInstall() { ((BaseAchievement)this).OnInstall(); GlobalEventManager.onClientDamageNotified += CheckDamage; } public override void OnUninstall() { GlobalEventManager.onClientDamageNotified -= CheckDamage; ((BaseAchievement)this).OnUninstall(); } private void CheckDamage(DamageDealtMessage damageDealtMessage) { if (Object.op_Implicit((Object)(object)damageDealtMessage.attacker) && (Object)(object)damageDealtMessage.attacker == (Object)(object)((BaseAchievement)this).localUser.cachedBodyObject && damageDealtMessage.crit && damageDealtMessage.damage >= 1000f) { ((BaseAchievement)this).Grant(); } } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.item.hunterssigil", SS2Bundle.Items); public override void Initialize() { ((UnlockableBase)this).AddRequiredType(); } } public sealed class MaliceUnlockable : UnlockableBase { public sealed class MaliceAchievement : BaseAchievement { public override void OnInstall() { ((BaseAchievement)this).OnInstall(); TeleporterInteraction.onTeleporterChargedGlobal += CheckTeleporterCompletion; } public override void OnUninstall() { TeleporterInteraction.onTeleporterChargedGlobal -= CheckTeleporterCompletion; ((BaseAchievement)this).OnUninstall(); } private void CheckTeleporterCompletion(TeleporterInteraction teleporterInteraction) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)Run.instance) && ((object)Run.instance).GetType() == typeof(Run)) { SceneDef sceneDefForCurrentScene = SceneCatalog.GetSceneDefForCurrentScene(); Run instance = Run.instance; if (!((Object)(object)sceneDefForCurrentScene == (Object)null) && instance.selectedDifficulty == Typhoon.TyphoonIndex && sceneDefForCurrentScene.stageOrder == 3) { ((BaseAchievement)this).Grant(); } } } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.item.malice", SS2Bundle.Items); public override void Initialize() { ((UnlockableBase)this).AddRequiredType(); } } public sealed class NkotasHeritageUnlockable : UnlockableBase { public sealed class NkotasHeritageAchievement : BaseAchievement { private PlayerCharacterMasterController currentMasterController; private Inventory currentInventory; public override void OnInstall() { ((BaseAchievement)this).OnInstall(); ((BaseAchievement)this).localUser.onMasterChanged += OnMasterChanged; SetMasterController(((BaseAchievement)this).localUser.cachedMasterController); } public override void OnUninstall() { SetMasterController(null); ((BaseAchievement)this).localUser.onMasterChanged -= OnMasterChanged; ((BaseAchievement)this).OnUninstall(); } private void SetMasterController(PlayerCharacterMasterController newMasterController) { if (currentMasterController != newMasterController) { if (currentInventory != null) { currentInventory.onInventoryChanged -= OnInventoryChanged; } currentMasterController = newMasterController; PlayerCharacterMasterController obj = currentMasterController; object obj2; if (obj == null) { obj2 = null; } else { CharacterMaster master = obj.master; obj2 = ((master != null) ? master.inventory : null); } currentInventory = (Inventory)obj2; if (currentInventory != null) { currentInventory.onInventoryChanged += OnInventoryChanged; } } } private void OnInventoryChanged() { //IL_0035: 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_0047: Invalid comparison between Unknown and I4 if (!Object.op_Implicit((Object)(object)currentInventory)) { return; } int num = 25; if (currentInventory.itemAcquisitionOrder.Count < num) { return; } int num2 = 0; for (int i = 0; i < currentInventory.itemAcquisitionOrder.Count; i++) { ItemDef itemDef = ItemCatalog.GetItemDef(currentInventory.itemAcquisitionOrder[i]); if ((int)itemDef.tier != 5 && !itemDef.hidden) { num2++; } } if (num2 >= num) { ((BaseAchievement)this).Grant(); } } private void OnMasterChanged() { SetMasterController(((BaseAchievement)this).localUser.cachedMasterController); } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.item.nkotasheritage", SS2Bundle.Items); public override void Initialize() { ((UnlockableBase)this).AddRequiredType(); } } public sealed class StrangeCanUnlockable : UnlockableBase { public sealed class StrangeCanAchievement : BaseAchievement { public override void OnInstall() { ((BaseAchievement)this).OnInstall(); GlobalEventManager.onServerDamageDealt += CheckDebuff; } public override void OnUninstall() { GlobalEventManager.onServerDamageDealt -= CheckDebuff; ((BaseAchievement)this).OnUninstall(); } private void CheckDebuff(DamageReport damageReport) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) CharacterBody victimBody = damageReport.victimBody; _ = damageReport.attackerBody; int num = 0; BuffIndex[] debuffBuffIndices = BuffCatalog.debuffBuffIndices; foreach (BuffIndex val in debuffBuffIndices) { if (victimBody.HasBuff(val)) { num++; } } if (num >= 6) { ((BaseAchievement)this).Grant(); } } } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.item.strangecan", SS2Bundle.Indev); public override void Initialize() { ((UnlockableBase)this).AddRequiredType(); } } } namespace Moonstorm.Starstorm2.Unlocks.Artifacts { public sealed class CognationUnlockable : UnlockableBase { public sealed class CognationAchievement : BaseObtainArtifactAchievement { public override ArtifactDef artifactDef => SS2Content.Artifacts.Cognation; } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.artifact.cognation", SS2Bundle.Artifacts); public override void Initialize() { ((UnlockableBase)this).AddRequiredType(); } } [DisabledContent] public sealed class DeviationUnlockable : UnlockableBase { public sealed class DeviationAchievement : BaseObtainArtifactAchievement { public override ArtifactDef artifactDef => SS2Content.Artifacts.Deviation; } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.artifact.deviation", SS2Bundle.Artifacts); public override void Initialize() { ((UnlockableBase)this).AddRequiredType(); } } public sealed class HavocUnlockable : UnlockableBase { public sealed class HavocAchievement : BaseObtainArtifactAchievement { public override ArtifactDef artifactDef => SS2Content.Artifacts.Havoc; } public override MSUnlockableDef UnlockableDef { get; } = SS2Assets.LoadAsset("ss2.artifact.havoc", SS2Bundle.Artifacts); public override void Initialize() { ((UnlockableBase)this).AddRequiredType(); } } } namespace Moonstorm.Starstorm2.Scenes { [DisabledContent] public sealed class RedPlane : SceneBase { public override SceneDef SceneDef { get; } = SS2Assets.LoadAsset("redplane", SS2Bundle.Indev); } [DisabledContent] public sealed class SlateMines : SceneBase { public override SceneDef SceneDef { get; } = SS2Assets.LoadAsset("slatemines", SS2Bundle.Indev); } [DisabledContent] public sealed class TorridOutlands : SceneBase { public override SceneDef SceneDef { get; } = SS2Assets.LoadAsset("torridoutlands", SS2Bundle.Indev); } [DisabledContent] public sealed class VoidShop : SceneBase { private static MusicTrackDef music = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/muSong08.asset").WaitForCompletion(); public static GameObject portalPrefab; public override SceneDef SceneDef { get; } = SS2Assets.LoadAsset("VoidShop", SS2Bundle.Stages); public override void Initialize() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown ((SceneBase)this).SceneDef.mainTrack = music; portalPrefab = PrefabAPI.InstantiateClone(SS2Assets.LoadAsset("PortalStrangerExit", SS2Bundle.Stages), "StrangerPortal", true); PrefabAPI.RegisterNetworkPrefab(portalPrefab); SceneDirector.Start += new hook_Start(SceneDirector_Start); } public static void SceneDirector_Start(orig_Start orig, SceneDirector self) { //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_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_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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) //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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); Scene activeScene = SceneManager.GetActiveScene(); if (((Scene)(ref activeScene)).name == "VoidShop") { new MasterSummon { position = new Vector3(-26f, 0f, 65.5f), rotation = new Quaternion(0f, 90f, 0f, 0f), masterPrefab = SS2Assets.LoadAsset("TraderMaster", SS2Bundle.Indev), teamIndexOverride = (TeamIndex)0 }.Perform(); Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(9f, 35f, -110f); Quaternion val2 = Quaternion.Euler(330f, 0f, 0f); NetworkServer.Spawn(Object.Instantiate(portalPrefab, val, val2)); } } } } namespace Moonstorm.Starstorm2.Projectiles { public sealed class KnightShieldBeam : ProjectileBase { public override GameObject ProjectilePrefab { get; } = SS2Assets.LoadAsset("KnightShieldBeamProjectile", SS2Bundle.Indev); } public sealed class KnightSwordBeam : ProjectileBase { public override GameObject ProjectilePrefab { get; } = SS2Assets.LoadAsset("KnightSwordBeamProjectile", SS2Bundle.Indev); } public sealed class NemCommandoGrenade : ProjectileBase { public override GameObject ProjectilePrefab { get; } = SS2Assets.LoadAsset("NemCommandoGrenadeProjectile", SS2Bundle.NemCommando); public override void Initialize() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) ((ProjectileBase)this).ProjectilePrefab.GetComponent().impactEffect = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/OmniExplosionVFXCommandoGrenade.prefab").WaitForCompletion(); } } public sealed class NemHuntressArrow : ProjectileBase { public override GameObject ProjectilePrefab { get; } = SS2Assets.LoadAsset("NemHuntressArrowProjectile", SS2Bundle.Indev); public override void Initialize() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((ProjectileBase)this).ProjectilePrefab.AddComponent().Add(WeakPointProjectile.weakPointProjectile); } } public sealed class NemHuntressExplosiveArrow : ProjectileBase { public override GameObject ProjectilePrefab { get; } = SS2Assets.LoadAsset("NemHuntressExplosiveArrowProjectile", SS2Bundle.Indev); public override void Initialize() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((ProjectileBase)this).ProjectilePrefab.AddComponent().Add(WeakPointProjectile.weakPointProjectile); } } public sealed class NemMercenaryKnife : ProjectileBase { public override GameObject ProjectilePrefab { get; } = SS2Assets.LoadAsset("KnifeProjectile", SS2Bundle.NemMercenary); public override void Initialize() { } } public sealed class NemmandoDistantGash : ProjectileBase { public override GameObject ProjectilePrefab { get; } = SS2Assets.LoadAsset("NemCommandoSwordBeamProjectile", SS2Bundle.NemCommando); public override void Initialize() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((ProjectileBase)this).ProjectilePrefab.AddComponent().Add(Moonstorm.Starstorm2.DamageTypes.Gouge.gougeDamageType); } } public sealed class NemmandoDistantGashBlue : ProjectileBase { public override GameObject ProjectilePrefab { get; } = SS2Assets.LoadAsset("NemCommandoSwordBeamProjectileBlue", SS2Bundle.NemCommando); public override void Initialize() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((ProjectileBase)this).ProjectilePrefab.AddComponent().Add(Moonstorm.Starstorm2.DamageTypes.Gouge.gougeDamageType); } } public sealed class NemmandoDistantGashClassic : ProjectileBase { public override GameObject ProjectilePrefab { get; } = SS2Assets.LoadAsset("NemmandoSwordBeamProjectile", SS2Bundle.Nemmando); public override void Initialize() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((ProjectileBase)this).ProjectilePrefab.AddComponent().Add(Moonstorm.Starstorm2.DamageTypes.Gouge.gougeDamageType); } } public sealed class NemmandoDistantGashYellow : ProjectileBase { public override GameObject ProjectilePrefab { get; } = SS2Assets.LoadAsset("NemCommandoSwordBeamProjectileYellow", SS2Bundle.NemCommando); public override void Initialize() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((ProjectileBase)this).ProjectilePrefab.AddComponent().Add(Moonstorm.Starstorm2.DamageTypes.Gouge.gougeDamageType); } } } namespace Moonstorm.Starstorm2.Items { [DisabledContent] public sealed class Augury : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IOnTakeDamageServerReceiver { private NetworkedBodyAttachment attachment; private EntityStateMachine esm; [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.Augury; } private void Start() { attachment = Object.Instantiate(SS2Assets.LoadAsset("AuguryBodyAttachment", SS2Bundle.Indev)).GetComponent(); attachment.AttachToGameObjectAndSpawn(((Component)((BaseItemBodyBehavior)this).body).gameObject, (string)null); esm = ((Component)attachment).gameObject.GetComponent(); ref IOnTakeDamageServerReceiver[] onTakeDamageReceivers = ref ((BaseItemBodyBehavior)this).body.healthComponent.onTakeDamageReceivers; IOnTakeDamageServerReceiver val = (IOnTakeDamageServerReceiver)(object)this; ArrayUtils.ArrayAppend(ref onTakeDamageReceivers, ref val); } private void FixedUpdate() { if (!((BaseItemBodyBehavior)this).body.healthComponent.alive) { Object.Destroy((Object)(object)this); } } private void OnDestroy() { if (Object.op_Implicit((Object)(object)attachment)) { Object.Destroy((Object)(object)((Component)attachment).gameObject); attachment = null; } int num = Array.IndexOf(((BaseItemBodyBehavior)this).body.healthComponent.onTakeDamageReceivers, (IOnTakeDamageServerReceiver)(object)this); if (num > -1) { ArrayUtils.ArrayRemoveAtAndResize(ref ((BaseItemBodyBehavior)this).body.healthComponent.onTakeDamageReceivers, ((BaseItemBodyBehavior)this).body.healthComponent.onTakeDamageReceivers.Length, num); } } public void OnTakeDamageServer(DamageReport damageReport) { if (esm.state is AuguryIdle auguryIdle) { auguryIdle.OnTakeDamage(damageReport); } } } public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("Augury", SS2Bundle.Indev); } public sealed class Remuneration : ItemBase { public sealed class RemunerationBehavior : BaseItemMasterBehavior { [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.Remuneration; } private new void Awake() { Stage.onServerStageBegin += TrySpawnShop; } private void OnDestroy() { Stage.onServerStageBegin -= TrySpawnShop; } private void TrySpawnShop(Stage stage) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Invalid comparison between Unknown and I4 if (Object.op_Implicit((Object)(object)stage.sceneDef) && (int)stage.sceneDef.sceneType == 1) { ((Component)this).GetComponent().onBodyStart += SpawnPortalOnBody; } } private void SpawnPortalOnBody(CharacterBody body) { //IL_000b: 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) Object.Instantiate(remunerationControllerPrefab, body.coreTransform.position, body.coreTransform.rotation).GetComponent().AttachToGameObjectAndSpawn(((Component)body).gameObject, (string)null); body.master.onBodyStart -= SpawnPortalOnBody; } } public static GameObject remunerationControllerPrefab; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("Remuneration", SS2Bundle.Items); public override void Initialize() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown ((ContentBase)this).Initialize(); remunerationControllerPrefab = SS2Assets.LoadAsset("RemunerationController", SS2Bundle.Items); PickupDisplay.RebuildModel += new hook_RebuildModel(EnableVoidParticles); } private void EnableVoidParticles(orig_RebuildModel orig, PickupDisplay self) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Invalid comparison between Unknown and I4 //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); PickupDef pickupDef = PickupCatalog.GetPickupDef(self.pickupIndex); ItemIndex val = (ItemIndex)((pickupDef == null) ? (-1) : ((int)pickupDef.itemIndex)); if ((int)val != -1 && ItemCatalog.GetItemDef(val).tier == SS2Content.ItemTierDefs.Sibylline.tier && Object.op_Implicit((Object)(object)self.voidParticleEffect)) { self.voidParticleEffect.SetActive(true); } } } public sealed class ShackledLamp : ItemBase { public sealed class LampBehavior : BaseItemBodyBehavior { private static GameObject projectilePrefab = SS2Assets.LoadAsset("LampBulletPlayer", SS2Bundle.Items); private float attackCounter; private List lampDisplay; private Transform displayPos; private ItemFollower follower; private bool tried; [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.ShackledLamp; } private void Start() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) displayPos = null; ((BaseItemBodyBehavior)this).body.onSkillActivatedAuthority += ChainEffect; lampDisplay = ((Component)((BaseItemBodyBehavior)this).body.modelLocator.modelTransform).GetComponent().GetItemDisplayObjects(SS2Content.Items.ShackledLamp.itemIndex); } private void ChainEffect(GenericSkill skill) { if (((object)((BaseItemBodyBehavior)this).body.skillLocator.primary).Equals((object?)skill) && !(skill.skillNameToken == "SS2_EXECUTIONER2_IONBURST_NAME")) { IncrementFire(); } } public void IncrementFire() { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) attackCounter += 1f; if (attackCounter >= 5f) { attackCounter %= 5f; Util.PlayAttackSpeedSound("LampBullet", ((Component)this).gameObject, ((BaseItemBodyBehavior)this).body.attackSpeed); float num = ((BaseItemBodyBehavior)this).body.damage * (2f + (float)base.stack); Vector3 val = ((BaseItemBodyBehavior)this).body.inputBank.aimOrigin; SS2Log.Info("lampDisplay.Count: " + lampDisplay.Count); if ((Object)(object)displayPos != (Object)null) { val = displayPos.position; } else if (lampDisplay.Count != 0) { follower = lampDisplay[0].GetComponent(); displayPos = ((Component)follower.followerInstance.transform.Find("mdlLamp")).transform; val = displayPos.position; } ProjectileManager.instance.FireProjectile(projectilePrefab, val, Util.QuaternionSafeLookRotation(((BaseItemBodyBehavior)this).body.inputBank.aimDirection), ((Component)((BaseItemBodyBehavior)this).body).gameObject, num, 60f, Util.CheckRoll(((BaseItemBodyBehavior)this).body.crit, ((BaseItemBodyBehavior)this).body.master), (DamageColorIndex)0, (GameObject)null, -1f); } } private void OnDestroy() { ((BaseItemBodyBehavior)this).body.onSkillActivatedAuthority -= ChainEffect; } } public Pair lampPair; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("ShackledLamp", SS2Bundle.Items); public override void Initialize() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown ((ContentBase)this).Initialize(); ContagiousItemManager.Init += new hook_Init(AddZoeaPair); } private void AddZoeaPair(orig_Init orig) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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_002a: Unknown result type (might be due to invalid IL or missing references) List list = new List(); Pair val = default(Pair); val.itemDef1 = ((ItemBase)this).ItemDef; val.itemDef2 = Items.VoidMegaCrabItem; Pair item = val; list.Add(item); Pair[] first = ItemCatalog.itemRelationships[ItemRelationshipTypes.ContagiousItem]; ItemCatalog.itemRelationships[ItemRelationshipTypes.ContagiousItem] = first.Union(list).ToArray(); orig.Invoke(); } } public sealed class StirringSoul : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IOnKilledOtherServerReceiver { public float currentChance; private static GameObject MonsterSoulPickup = SS2Assets.LoadAsset("MonsterSoul", SS2Bundle.Items); [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.StirringSoul; } public void OnKilledOtherServer(DamageReport report) { //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_004c: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && !Run.instance.isRunStopwatchPaused && Object.op_Implicit((Object)(object)report.victimMaster)) { GameObject val = Object.Instantiate(MonsterSoulPickup, report.victimBody.corePosition, Random.rotation); val.GetComponent().teamIndex = ((BaseItemBodyBehavior)this).body.teamComponent.teamIndex; SoulPickup componentInChildren = val.GetComponentInChildren(); componentInChildren.team = val.GetComponent(); componentInChildren.chance = currentChance; componentInChildren.Behavior = this; NetworkServer.Spawn(val); } } public void ChangeChance(bool reset) { if (reset) { currentChance = initChance * 200f; } else if (currentChance < maxChance * 200f) { currentChance += initChance * 200f; } } } [RooConfigurableField("SS2.Items", ConfigDesc = "Chance to gain soul initially. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float initChance = 0.005f; [RooConfigurableField("SS2.Items", ConfigDesc = "Soul gain chance cap. (1 = 100%)")] public static float maxChance = 0.1f; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("StirringSoul", SS2Bundle.Items); } public sealed class ChirrFriendHelper : ItemBase { public sealed class BodyBehavior : BaseItemBodyBehavior, IBodyStatArgModifier { private float leashTimer = 2f; private float curseTimer; private float desiredHealthFraction = 1f; private GameObject jitterBonesEffect; [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.ChirrFriendHelper; } private void Start() { if (NetworkServer.active) { ((BaseItemBodyBehavior)this).body.AddBuff(SS2Content.Buffs.BuffChirrFriend); } CharacterModel component = ((Component)((BaseItemBodyBehavior)this).body.modelLocator.modelTransform).GetComponent(); SkinnedMeshRenderer mainSkinnedMeshRenderer = component.mainSkinnedMeshRenderer; jitterBonesEffect = Object.Instantiate(jitterEffectPrefab, ((Component)component).transform); if (Object.op_Implicit((Object)(object)mainSkinnedMeshRenderer)) { JitterBones[] components = jitterBonesEffect.GetComponents(); for (int i = 0; i < components.Length; i++) { components[i].skinnedMeshRenderer = mainSkinnedMeshRenderer; } } } private void OnDestroy() { if (Object.op_Implicit((Object)(object)jitterBonesEffect)) { Object.Destroy((Object)(object)jitterBonesEffect); } if (NetworkServer.active && ((Behaviour)((BaseItemBodyBehavior)this).body).enabled) { ((BaseItemBodyBehavior)this).body.RemoveBuff(SS2Content.Buffs.BuffChirrFriend); } } private void FixedUpdate() { //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) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: 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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0101: 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) CharacterMaster master = ((BaseItemBodyBehavior)this).body.master; CharacterMaster val = (Object.op_Implicit((Object)(object)master) ? master.minionOwnership.ownerMaster : null); GameObject val2 = (Object.op_Implicit((Object)(object)val) ? val.GetBodyObject() : null); if (!Object.op_Implicit((Object)(object)val2)) { return; } Vector3 position = val2.transform.position; Vector3 val3 = position - ((Component)this).transform.position; if (!(((Vector3)(ref val3)).magnitude >= leashDistance)) { return; } leashTimer -= Time.fixedDeltaTime; if (leashTimer <= 0f) { leashTimer += 2f; Vector3 val4 = Vector2.op_Implicit(Random.insideUnitCircle * leashTeleportOffset); Vector3 val5 = (Vector3)(((??)TeleportHelper.FindSafeTeleportDestination(position + val4, ((BaseItemBodyBehavior)this).body, RoR2Application.rng)) ?? (position + Vector3.up * 10f)); TeleportHelper.TeleportBody(((BaseItemBodyBehavior)this).body, val5); EntityStateMachine val6 = EntityStateMachine.FindByCustomName(((Component)this).gameObject, "Body"); if (Object.op_Implicit((Object)(object)val6)) { val6.SetNextState(EntityStateCatalog.InstantiateState(val6.initialStateType)); } } } public void ModifyStatArguments(StatHookEventArgs args) { float num = Mathf.Max((((BaseItemBodyBehavior)this).body.attackSpeed - 1f) * attackSpeedToCooldownConversion, 0f); args.cooldownMultAdd *= Util.ConvertAmplificationPercentageIntoReductionPercentage(num * 100f) / 100f; } } public sealed class MasterBehavior : BaseItemMasterBehavior { private GameObject ownerBodyObject; private EntityStateMachine stateMachine; private BaseAI ai; private bool wasFullVision; [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.ChirrFriendHelper; } private void OnEnable() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) if (base.master.aiComponents.Length != 0) { ai = base.master.aiComponents[0]; BaseAI obj = ai; obj.aimVectorMaxSpeed *= aimSpeedCoefficient; stateMachine = ai.stateMachine; EntityStateMachine obj2 = stateMachine; obj2.nextStateModifier = (ModifyNextStateDelegate)Delegate.Combine((Delegate?)(object)obj2.nextStateModifier, (Delegate?)new ModifyNextStateDelegate(ModifyNextState)); ai.scanState = new SerializableEntityStateType(typeof(FollowLeader)); wasFullVision = ai.fullVision; ai.fullVision = true; ai.currentEnemy.Reset(); ai.customTarget.Reset(); ai.buddy.Reset(); ai.ForceAcquireNearestEnemyIfNoCurrentEnemy(); } } private void FixedUpdate() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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) CharacterMaster ownerMaster = base.master.minionOwnership.ownerMaster; ownerBodyObject = (Object.op_Implicit((Object)(object)ownerMaster) ? ownerMaster.GetBodyObject() : null); GameObject bodyObject = base.master.GetBodyObject(); if (Object.op_Implicit((Object)(object)ai) && Object.op_Implicit((Object)(object)bodyObject)) { ResetTargetIfDead(); Vector3 position = bodyObject.transform.position; ai.currentEnemy.GetBullseyePosition(ref position); Vector3 val = position - bodyObject.transform.position; if (((Vector3)(ref val)).magnitude > maxEnemyTargetDistance && stateMachine.state is Combat) { stateMachine.SetNextState((EntityState)(object)new FollowLeader { leader = ownerBodyObject }); } } } private void ModifyNextState(EntityStateMachine machine, ref EntityState nextState) { if (nextState is LookBusy || nextState is Wander) { nextState = (EntityState)(object)new FollowLeader { leader = ownerBodyObject }; } } private void ResetTargetIfDead() { Target currentEnemy = ai.currentEnemy; if (!Object.op_Implicit((Object)(object)currentEnemy.gameObject) || (Object.op_Implicit((Object)(object)currentEnemy.healthComponent) && !currentEnemy.healthComponent.alive)) { ai.currentEnemy.Reset(); HurtBox val = ai.FindEnemyHurtBox(float.PositiveInfinity, true, true); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.healthComponent)) { ai.currentEnemy.gameObject = ((Component)val.healthComponent).gameObject; ai.currentEnemy.bestHurtBox = val; } } } private void OnDisable() { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) if (base.master.aiComponents.Length != 0 && ((Behaviour)base.master.aiComponents[0]).enabled) { BaseAI obj = base.master.aiComponents[0]; obj.aimVectorMaxSpeed /= aimSpeedCoefficient; EntityStateMachine obj2 = obj.stateMachine; obj2.nextStateModifier = (ModifyNextStateDelegate)Delegate.Remove((Delegate?)(object)obj2.nextStateModifier, (Delegate?)new ModifyNextStateDelegate(ModifyNextState)); obj.scanState = new SerializableEntityStateType(typeof(Wander)); obj.fullVision = wasFullVision; obj.currentEnemy.Reset(); obj.customTarget.Reset(); obj.buddy.Reset(); obj.enemyAttention = 0f; obj.ForceAcquireNearestEnemyIfNoCurrentEnemy(); } } } public static GameObject jitterEffectPrefab = SS2Assets.LoadAsset("FriendJitterEffect", SS2Bundle.Chirr); public static float attackSpeedToCooldownConversion = 1f; public static float aimSpeedCoefficient = 3f; public static float maxEnemyTargetDistance = 80f; public static float leashDistance = 160f; public static float leashTeleportOffset = 10f; public static float timeUntilMaxCurse = 100f; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("ChirrFriendHelper", SS2Bundle.Chirr); } public sealed class Cognation : ItemBase { public sealed class Behavior : BaseItemBodyBehavior { private static Material ghostMaterial = SS2Assets.LoadAsset("matCognation", SS2Bundle.Artifacts); private CharacterModel model; [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.Cognation; } private void Start() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Invalid comparison between Unknown and I4 if ((int)((BaseItemBodyBehavior)this).body.teamComponent.teamIndex == 1) { ((BaseItemBodyBehavior)this).body.inventory.RemoveItem(SS2Content.Items.Cognation, base.stack); Object.Destroy((Object)(object)this); } if (((BaseItemBodyBehavior)this).body.inventory.GetItemCount(SS2Content.Items.TerminationHelper) > 0) { ((BaseItemBodyBehavior)this).body.inventory.RemoveItem(SS2Content.Items.TerminationHelper, 1); } CharacterBody body = ((BaseItemBodyBehavior)this).body; body.baseMaxHealth *= 3f; CharacterBody body2 = ((BaseItemBodyBehavior)this).body; body2.baseMoveSpeed *= 1.25f; CharacterBody body3 = ((BaseItemBodyBehavior)this).body; body3.baseAttackSpeed *= 1.25f; CharacterBody body4 = ((BaseItemBodyBehavior)this).body; body4.baseDamage *= 0.9f; CharacterBody body5 = ((BaseItemBodyBehavior)this).body; body5.baseArmor -= 25f; ((BaseItemBodyBehavior)this).body.PerformAutoCalculateLevelStats(); ((BaseItemBodyBehavior)this).body.RecalculateStats(); ModelLocator modelLocator = ((BaseItemBodyBehavior)this).body.modelLocator; if (Object.op_Implicit((Object)(object)modelLocator)) { Transform modelTransform = modelLocator.modelTransform; if (Object.op_Implicit((Object)(object)modelTransform)) { model = ((Component)modelTransform).GetComponent(); } } if (Object.op_Implicit((Object)(object)model)) { ModifyCharacterModel(); } } private void ModifyCharacterModel() { for (int i = 0; i < model.baseRendererInfos.Length; i++) { Material defaultMaterial = model.baseRendererInfos[i].defaultMaterial; if (((Object)defaultMaterial.shader).name.StartsWith("Hopoo Games/Deferred")) { if (!Object.op_Implicit((Object)(object)ghostMaterial)) { SS2Log.Info("Shader was null?"); ghostMaterial = SS2Assets.LoadAsset("matCognation", SS2Bundle.Artifacts); } defaultMaterial = ghostMaterial; model.baseRendererInfos[i].defaultMaterial = defaultMaterial; } } } private void OnDestroy() { if (Object.op_Implicit((Object)(object)model)) { (((Component)model).GetComponent() ?? ((Component)model).gameObject.AddComponent()).cull = true; } } } public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("Cognation", SS2Bundle.Items); public override void Initialize() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown Util.GetBestBodyName += new hook_GetBestBodyName(AddCognateName3); } private string AddCognateName3(orig_GetBestBodyName orig, GameObject bodyObject) { string text = orig.Invoke(bodyObject); CharacterBody val = ((bodyObject != null) ? bodyObject.GetComponent() : null); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.inventory) && val.inventory.GetItemCount(SS2Content.Items.Cognation) > 0) { text = Language.GetStringFormatted("SS2_ARTIFACT_COGNATION_PREFIX", new object[1] { text }); } return text; } } public sealed class NemesisBossHelper : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IBodyStatArgModifier { [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.NemBossHelper; } public void ModifyStatArguments(StatHookEventArgs args) { args.healthMultAdd += 12f; args.damageMultAdd += 0.75f; ((BaseItemBodyBehavior)this).body.regen = 0f; } } public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("NemBossHelper", SS2Bundle.Items); } public sealed class SantaHat : ItemBase { public static float percentHatChance = 10f; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("SantaHat", SS2Bundle.Items); public override GameObject ItemDisplayPrefab => SS2Assets.LoadAsset("DisplaySantaHat", SS2Bundle.Items); public override void Initialize() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown if (DateTime.Today.Month == 12) { SS2Log.Info("Merry Chirristmas to about " + percentHatChance + "% of you!"); CharacterMaster.onCharacterMasterDiscovered += GiveHat; CharacterModel.Start += new hook_Start(CharacterModel_Start); } } private static void CharacterModel_Start(orig_Start orig, CharacterModel self) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!Object.op_Implicit((Object)(object)Run.instance)) { self.EnableItemDisplay(SS2Content.Items.SantaHat.itemIndex); } } private static void GiveHat(CharacterMaster master) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && Util.CheckRoll(percentHatChance, 0f, (CharacterMaster)null) && Object.op_Implicit((Object)(object)master.inventory)) { master.inventory.GiveItem(SS2Content.Items.SantaHat.itemIndex, 1); string text = ((Object)master).name.Replace("Master(Clone)", ""); SS2Log.Info("Merry Chirristmas to " + text + "!"); } } } public sealed class TerminationHelper : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IBodyStatArgModifier { private static AnimationCurve sizeCurve; public GameObject terminationMark; public GameObject markRing; public GameObject markSpinBoss; private float timer; private float maxTime = 30f; public Transform pointerToken; private int i; public bool activeRing; public RelicOfTermination.TerminationToken token; [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.TerminationHelper; } public void Awake() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) ((BaseItemBodyBehavior)this).Awake(); globalMarkEffectTwo = SS2Assets.LoadAsset("TerminationPositionIndicator", SS2Bundle.Items); float scaleMod = RelicOfTermination.scaleMod; Transform modelTransform = ((BaseItemBodyBehavior)this).body.modelLocator.modelTransform; modelTransform.localScale *= scaleMod; if (((BaseItemBodyBehavior)this).body.isFlying) { KinematicCharacterMotor[] componentsInChildren = ((Component)((BaseItemBodyBehavior)this).body).GetComponentsInChildren(); foreach (KinematicCharacterMotor val in componentsInChildren) { if (Object.op_Implicit((Object)(object)val)) { val.SetCapsuleDimensions(val.Capsule.radius * scaleMod, val.CapsuleHeight * scaleMod, scaleMod); } } } PrintController component = ((Component)((BaseItemBodyBehavior)this).body.modelLocator.modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.printTime = 25f; component.maxPrintHeight = 100f; } if (!((BaseItemBodyBehavior)this).body.isBoss) { ((BaseItemBodyBehavior)this).body.teamComponent.RequestDefaultIndicator(globalMarkEffectTwo); } token = ((Component)((BaseItemBodyBehavior)this).body).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)token)) { maxTime = token.timeLimit; } } public void FixedUpdate() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)markRing)) { float num = timer / maxTime; if (num < 1f) { float num2 = sizeCurve.Evaluate(num); Vector3 localScale = default(Vector3); ((Vector3)(ref localScale))..ctor(num2, num2, num2); markRing.transform.localScale = localScale; timer += Time.fixedDeltaTime; } else if (activeRing) { markRing.SetActive(false); activeRing = false; } } else { if (i >= 25) { return; } pointerToken = ((BaseItemBodyBehavior)this).body.transform.Find("TerminationPositionIndicator(Clone)"); if (Object.op_Implicit((Object)(object)pointerToken)) { PositionIndicator component = ((Component)pointerToken).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { GameObject insideViewObject = component.insideViewObject; if (Object.op_Implicit((Object)(object)insideViewObject)) { markRing = ((Component)insideViewObject.transform.Find("Ring")).gameObject; if (((BaseItemBodyBehavior)this).body.isBoss) { ((Component)insideViewObject.transform.Find("Crosshair2")).gameObject.SetActive(true); } sizeCurve = AnimationCurve.Linear(0f, 0.235f, 1f, 0.066f); activeRing = true; } } } i++; if (i >= 25) { SS2Log.Info("Giving up on finding termination ring for " + ((Object)((BaseItemBodyBehavior)this).body).name); } } } public void ModifyStatArguments(StatHookEventArgs args) { args.healthMultAdd += RelicOfTermination.hpMult; args.damageMultAdd += RelicOfTermination.damageMult; args.moveSpeedMultAdd += RelicOfTermination.speedMult; args.attackSpeedMultAdd += RelicOfTermination.atkSpeedMult; args.baseHealthAdd += RelicOfTermination.hpAdd + RelicOfTermination.hpAdd / 4f * (((BaseItemBodyBehavior)this).body.level - 1f); } } public static GameObject globalMarkEffectTwo; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("TerminationHelper", SS2Bundle.Items); } public sealed class VoidRock : ItemBase { public sealed class VoidRockBehavior : BaseItemBodyBehavior { [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.VoidRock; } public void Awake() { ((BaseItemBodyBehavior)this).Awake(); Debug.Log((object)("invasionStage : " + invasionStage)); Debug.Log((object)("initialStage : " + initialStage)); } public void OnDestroy() { if ((Object)(object)Run.instance == (Object)null) { setStage = false; invasionStage = false; initialStage = 0; } else if (setStage) { if ((Run.instance.stageClearCount - initialStage) % 3 == 0) { invasionStage = true; } else { invasionStage = false; } } } } public static int initialStage; public static bool setStage; public static bool invasionStage; public static Inventory inventory; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("VoidRock", SS2Bundle.Interactables); public override void Initialize() { ((ContentBase)this).Initialize(); Run.onRunStartGlobal += Run_onRunStartGlobal; } private static void Run_onRunStartGlobal(Run run) { initialStage = 0; setStage = false; invasionStage = false; } } public sealed class VoidRockTracker : ItemBase { public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("VoidRockTracker", SS2Bundle.Interactables); } [DisabledContent] public sealed class RelicOfEchelon : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IBodyStatArgModifier { [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.RelicOfEchelon; } private void OnEnable() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown EquipmentSlot.onServerEquipmentActivated += GrantEchelonBuff; HealthBar.UpdateBarInfos += new hook_UpdateBarInfos(Echelon2); } private void OnDisable() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown EquipmentSlot.onServerEquipmentActivated -= GrantEchelonBuff; HealthBar.UpdateBarInfos -= new hook_UpdateBarInfos(Echelon2); } private void GrantEchelonBuff(EquipmentSlot arg1, EquipmentIndex arg2) { //IL_009d: 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_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_00b0: 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_00db: Unknown result type (might be due to invalid IL or missing references) EchelonToken echelonToken = ((Component)arg1.characterBody.inventory).gameObject.GetComponent(); Inventory inventory = arg1.characterBody.inventory; if (!Object.op_Implicit((Object)(object)inventory)) { return; } int itemCount = inventory.GetItemCount(SS2Content.Items.RelicOfEchelon); if (itemCount > 0) { if (!Object.op_Implicit((Object)(object)echelonToken)) { SS2Log.Debug("Token added in OnEquipmentActivated - should probably never happen, but may be fine", 160, "GrantEchelonBuff"); echelonToken = ((Component)arg1.characterBody.inventory).gameObject.AddComponent(); echelonToken.usedEquipment = new Dictionary(); } if ((Object)(object)echelonToken.body == (Object)null) { echelonToken.body = arg1.characterBody; } if (echelonToken.usedEquipment.ContainsKey(arg2)) { echelonToken.usedEquipment[arg2] += itemCount; } else { echelonToken.usedEquipment.Add(arg2, itemCount); } arg1.characterBody.AddTimedBuffAuthority(SS2Content.Buffs.BuffEchelon.buffIndex, buffDuration); ((MonoBehaviour)this).StartCoroutine(echelonToken.callRecalcOnBuffEnd()); } } private void Echelon2(orig_UpdateBarInfos orig, HealthBar self) { //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) orig.Invoke(self); HealthComponent source = self._source; if (Object.op_Implicit((Object)(object)source) && source.body.HasBuff(SS2Content.Buffs.BuffEchelon)) { self.barInfoCollection.trailingOverHealthbarInfo.color = echelonColor; } } public void ModifyStatArguments(StatHookEventArgs args) { if (((BaseItemBodyBehavior)this).body.HasBuff(SS2Content.Buffs.BuffEchelon)) { args.baseDamageAdd += damageBonus * (float)(base.stack - 1); args.baseHealthAdd += healthBonus * (float)(base.stack - 1); } } } public class EchelonToken : MonoBehaviour { public IDictionary usedEquipment; public CharacterBody body; public bool hadBuff; public IEnumerator callRecalcOnBuffEnd() { yield return (object)new WaitForSeconds(buffDuration + 0.01f); body.RecalculateStats(); } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_CalculateEquipmentCooldownScale <>9__9_0; internal float b__9_0(orig_CalculateEquipmentCooldownScale orig, Inventory self) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) float num = orig.Invoke(self); EquipmentIndex currentEquipmentIndex = self.currentEquipmentIndex; EchelonToken echelonToken = ((Component)self).gameObject.GetComponent(); EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(currentEquipmentIndex); int itemCount = self.GetItemCount(SS2Content.Items.RelicOfEchelon); if (itemCount > 0) { if (Object.op_Implicit((Object)(object)echelonToken)) { if (!echelonToken.usedEquipment.ContainsKey(currentEquipmentIndex)) { echelonToken.usedEquipment.Add(currentEquipmentIndex, itemCount); } } else { echelonToken = ((Component)self).gameObject.AddComponent(); echelonToken.usedEquipment = new Dictionary(); echelonToken.usedEquipment.Add(currentEquipmentIndex, itemCount); echelonToken.body = null; } int num2 = echelonToken.usedEquipment[currentEquipmentIndex]; float num3 = Mathf.Pow(1f + cooldownIncrease, (float)num2); float num4 = Math.Abs((0.7f + equipmentDef.cooldown) / equipmentDef.cooldown - 1f); if (equipmentDef.cooldown < 5f) { num4 -= (float)Mathf.Max(0, 6 - num2); } float num5 = (equipmentDef.cooldown + num4) * num3 / equipmentDef.cooldown; num *= num5; } return num; } } private const string token = "SS2_ITEM_RELICOFECHELON_DESC"; [RooConfigurableField("SS2.Items", ConfigDesc = "Equipment cooldown increase per use, per stack.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float cooldownIncrease = 0.15f; [RooConfigurableField("SS2.Items", ConfigDesc = "Base amount of additional base damage added.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float damageBonus = 150f; [RooConfigurableField("SS2.Items", ConfigDesc = "Base amount of additional base health added.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float healthBonus = 5000f; [RooConfigurableField("SS2.Items", ConfigDesc = "Duration of the Echelon buff. Does not scale with stacks. (1 = 1 second)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float buffDuration = 8f; public static Color echelonColor; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("RelicOfEchelon", SS2Bundle.Items); public override void Initialize() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown ((ContentBase)this).Initialize(); object obj = <>c.<>9__9_0; if (obj == null) { hook_CalculateEquipmentCooldownScale val = delegate(orig_CalculateEquipmentCooldownScale orig, Inventory self) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) float num = orig.Invoke(self); EquipmentIndex currentEquipmentIndex = self.currentEquipmentIndex; EchelonToken echelonToken = ((Component)self).gameObject.GetComponent(); EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(currentEquipmentIndex); int itemCount = self.GetItemCount(SS2Content.Items.RelicOfEchelon); if (itemCount > 0) { if (Object.op_Implicit((Object)(object)echelonToken)) { if (!echelonToken.usedEquipment.ContainsKey(currentEquipmentIndex)) { echelonToken.usedEquipment.Add(currentEquipmentIndex, itemCount); } } else { echelonToken = ((Component)self).gameObject.AddComponent(); echelonToken.usedEquipment = new Dictionary(); echelonToken.usedEquipment.Add(currentEquipmentIndex, itemCount); echelonToken.body = null; } int num2 = echelonToken.usedEquipment[currentEquipmentIndex]; float num3 = Mathf.Pow(1f + cooldownIncrease, (float)num2); float num4 = Math.Abs((0.7f + equipmentDef.cooldown) / equipmentDef.cooldown - 1f); if (equipmentDef.cooldown < 5f) { num4 -= (float)Mathf.Max(0, 6 - num2); } float num5 = (equipmentDef.cooldown + num4) * num3 / equipmentDef.cooldown; num *= num5; } return num; }; <>c.<>9__9_0 = val; obj = (object)val; } Inventory.CalculateEquipmentCooldownScale += (hook_CalculateEquipmentCooldownScale)obj; echelonColor = new Color(0.4235f, 0.6706f, 0.6588f); } } public sealed class RelicOfForce : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IBodyStatArgModifier, IOnDamageDealtServerReceiver { private ForceHitToken EnemyToken; [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.RelicOfForce; } public void ModifyStatArguments(StatHookEventArgs args) { float num = MSUtil.InverseHyperbolicScaling(forcePenalty, forcePenalty, 0.9f, base.stack); args.attackSpeedMultAdd -= num; args.secondaryCooldownMultAdd += num; args.utilityCooldownMultAdd += num; args.specialCooldownMultAdd += num; } public void OnDamageDealtServer(DamageReport damageReport) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) if (DamageAPI.HasModdedDamageType(damageReport.damageInfo, relicForceDamageType) || DamageAPI.HasModdedDamageType(damageReport.damageInfo, Malice.maliceDamageType) || !(damageReport.damageInfo.procCoefficient > 0f) || !Object.op_Implicit((Object)(object)damageReport.attacker) || !Object.op_Implicit((Object)(object)damageReport.victimBody)) { return; } int itemCount = damageReport.attackerBody.inventory.GetItemCount(SS2Content.Items.RelicOfForce); if (itemCount <= 0) { return; } ForceHitToken component = ((Component)damageReport.victim.body).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.CallMoreHits(damageReport, itemCount); return; } if (Object.op_Implicit((Object)(object)EnemyToken)) { Object.Destroy((Object)(object)EnemyToken); } (EnemyToken = ((Component)damageReport.victim.body).gameObject.AddComponent()).CallMoreHits(damageReport, itemCount); } } public class ForceHitToken : MonoBehaviour { public int hitCount; private void Start() { } public void CallMoreHits(DamageReport damageReport, int count) { if ((float)hitCount * hitIncrease < hitMax) { hitCount++; } ((MonoBehaviour)this).StartCoroutine(RelicForceDelayedHits(damageReport, count)); } private IEnumerator RelicForceDelayedHits(DamageReport damageReport, int count) { GameObject attacker = damageReport.attacker; CharacterBody victim = damageReport.victimBody; HealthComponent victimHealthComp = damageReport.victimBody.healthComponent; DamageInfo initalHit = damageReport.damageInfo; float hitMult = (float)hitCount * hitIncrease; for (int i = 0; i < count; i++) { DamageInfo damageInfo = new DamageInfo(); damageInfo.damage = damageReport.damageDealt * hitMult; damageInfo.attacker = attacker; damageInfo.inflictor = initalHit.inflictor; damageInfo.force = Vector3.zero; damageInfo.crit = initalHit.crit; damageInfo.procChainMask = initalHit.procChainMask; damageInfo.procCoefficient = initalHit.procCoefficient / 2f; damageInfo.position = victim.transform.position; damageInfo.damageColorIndex = (DamageColorIndex)3; damageInfo.damageType = initalHit.damageType; DamageAPI.AddModdedDamageType(damageInfo, relicForceDamageType); yield return (object)new WaitForSeconds(hitDelay); damageInfo.position = victim.transform.position; if (victim.healthComponent.alive) { damageInfo.position = victim.transform.position; victimHealthComp.TakeDamage(damageInfo); GlobalEventManager.instance.OnHitEnemy(damageInfo, ((Component)victimHealthComp).gameObject); GlobalEventManager.instance.OnHitAll(damageInfo, ((Component)victimHealthComp).gameObject); EffectData val = new EffectData { origin = victim.transform.position }; val.SetNetworkedObjectReference(((Component)victim).gameObject); EffectManager.SpawnEffect(SS2Assets.LoadAsset("RelicOfForceHitEffect", SS2Bundle.Items), val, true); } } } } [RooConfigurableField("SS2.Items", ConfigDesc = "Attack speed reduction and cooldown increase per stack. (1 = 100% slower attack speed and longer cooldowns)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float forcePenalty = 0.4f; [RooConfigurableField("SS2.Items", ConfigDesc = "Delay between additional hits. (1 = 1 second)")] public static float hitDelay = 0.2f; [RooConfigurableField("SS2.Items", ConfigDesc = "Increased damage per additional hits. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float hitIncrease = 0.05f; [RooConfigurableField("SS2.Items", ConfigDesc = "Increased damage cap for additional hits. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float hitMax = 1f; public static ModdedDamageType relicForceDamageType; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("RelicOfForce", SS2Bundle.Items); public override void Initialize() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) if (!Starstorm.GOTCEInstalled) { GenericSkill.CalculateFinalRechargeInterval += new hook_CalculateFinalRechargeInterval(ForceSkillFinalRecharge); } else { SS2Log.Info("GOTCE Compat - Not adding Force hook"); } relicForceDamageType = DamageAPI.ReserveDamageType(); } private float ForceSkillFinalRecharge(orig_CalculateFinalRechargeInterval orig, GenericSkill self) { float num = orig.Invoke(self); if (!(self.baseRechargeInterval > 0f)) { return 0f; } return Mathf.Max(num, self.baseRechargeInterval * self.cooldownScale - self.flatCooldownReduction); } } public sealed class RelicOfMass : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IBodyStatArgModifier, IStatItemBehavior { [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.RelicOfMass; } public void ModifyStatArguments(StatHookEventArgs args) { args.baseHealthAdd += (((BaseItemBodyBehavior)this).body.baseMaxHealth + ((BaseItemBodyBehavior)this).body.levelMaxHealth * (((BaseItemBodyBehavior)this).body.level - 1f)) * ((float)base.stack * healthIncrease); } public void RecalculateStatsStart() { } public void RecalculateStatsEnd() { ((BaseItemBodyBehavior)this).body.acceleration = ((BaseItemBodyBehavior)this).body.baseAcceleration / ((float)base.stack * acclMult); } } [RooConfigurableField("SS2.Items", ConfigDesc = "Amount of health increase. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float healthIncrease = 1f; [RooConfigurableField("SS2.Items", ConfigDesc = "Amount of which acceleration is divided by.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float acclMult = 8f; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("RelicOfMass", SS2Bundle.Items); } public sealed class RelicOfTermination : ItemBase { public sealed class TerminationBehavior : BaseItemBodyBehavior { private float EntranceTimer; public bool hasInitalizedList; [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.RelicOfTermination; } public void Awake() { ((BaseItemBodyBehavior)this).Awake(); EntranceTimer = 2.5f; if (!hasInitalizedList) { InitializeIllegalMarkList(); hasInitalizedList = true; } } public void FixedUpdate() { //IL_00db: Unknown result type (might be due to invalid IL or missing references) if (EntranceTimer > 0f) { EntranceTimer -= Time.deltaTime; } else { if (((BaseItemBodyBehavior)this).body.HasBuff(SS2Content.Buffs.BuffTerminationCooldown) || ((BaseItemBodyBehavior)this).body.HasBuff(SS2Content.Buffs.BuffTerminationReady) || !NetworkServer.active || !((BaseItemBodyBehavior)this).body.isPlayerControlled) { return; } TerminationHolderToken component = ((Component)((BaseItemBodyBehavior)this).body).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { if ((Object)(object)component.target != (Object)null && !((BaseItemBodyBehavior)this).body.HasBuff(SS2Content.Buffs.BuffTerminationFailed)) { ((BaseItemBodyBehavior)this).body.AddBuff(SS2Content.Buffs.BuffTerminationFailed); } else if ((Object)(object)component.target == (Object)null && ((BaseItemBodyBehavior)this).body.HasBuff(SS2Content.Buffs.BuffTerminationFailed)) { for (int i = 0; i < 5; i++) { ((BaseItemBodyBehavior)this).body.AddTimedBuffAuthority(SS2Content.Buffs.BuffTerminationCooldown.buffIndex, (float)(i + 1)); } } else if ((Object)(object)component.target == (Object)null) { ((BaseItemBodyBehavior)this).body.AddBuff(SS2Content.Buffs.BuffTerminationReady); } } else { ((BaseItemBodyBehavior)this).body.AddBuff(SS2Content.Buffs.BuffTerminationReady); } } } private static void InitializeIllegalMarkList() { //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Invalid comparison between Unknown and I4 //IL_019f: Unknown result type (might be due to invalid IL or missing references) foreach (string item in new List { "BrotherBody", "BrotherGlassBody", "BrotherHurtBody", "BrotherHauntBody", "ShopkeeperBody", "MiniVoidRaidCrabBodyBase", "MiniVoidRaidCrabBodyPhase1", "MiniVoidRaidCrabBodyPhase2", "MiniVoidRaidCrabBodyPhase3", "VoidRaidCrabJointBody", "VoidRaidCrabBody", "ScavLunar1Body", "ScavLunar2Body", "ScavLunar3Body", "ScavLunar4Body", "ScavSackProjectile", "ArtifactShellBody", "VagrantTrackingBomb", "LunarWispTrackingBomb", "GravekeeperTrackingFireball", "BeetleWard", "AffixEarthHealerBody", "AltarSkeletonBody", "DeathProjectile", "TimeCrystalBody", "SulfurPodBody", "FusionCellDestructibleBody", "ExplosivePotDestructibleBody", "SMInfiniteTowerMaulingRockLarge", "SMInfiniteTowerMaulingRockMedium", "SMInfiniteTowerMaulingRockSmall", "SMMaulingRockLarge", "SMMaulingRockMedium", "SMMaulingRockSmall", "VoidInfestorBody" }) { BodyIndex val = BodyCatalog.FindBodyIndexCaseInsensitive(item); if ((int)val != -1) { AddBodyToIllegalTerminationList(val); } } } public static void AddBodyToIllegalTerminationList(BodyIndex bodyIndex) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Invalid comparison between Unknown and I4 //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) if ((int)bodyIndex == -1) { SS2Log.Info("Tried to add a body to the illegal termination list, but it's index is none"); } else if (illegalMarks.Contains(bodyIndex)) { GameObject bodyPrefab = BodyCatalog.GetBodyPrefab(bodyIndex); SS2Log.Info($"Body prefab {bodyPrefab} is already in the illegal termination list."); } else { illegalMarks.Add(bodyIndex); } } } public class TerminationMarkerToken : MonoBehaviour { } public class TerminationToken : MonoBehaviour { public int itemCount; public bool hasFailed; public float initalTime; public TerminationHolderToken owner; public float timeLimit = 30f; public bool isBoss; } public class TerminationHolderToken : MonoBehaviour { public TerminationToken target; public CharacterBody body; public PlayerCharacterMasterController player; } public class TerminationDropTable : BasicPickupDropTable { private float tier1Weight = 0.79f; private float tier2Weight = 0.2f; private float tier3Weight = 0.01f; private readonly WeightedSelection selector = new WeightedSelection(8); private void AddNew(List sourceDropList, float listWeight) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) if (listWeight <= 0f || sourceDropList.Count == 0) { return; } float num = listWeight / (float)sourceDropList.Count; foreach (PickupIndex sourceDrop in sourceDropList) { selector.AddChoice(sourceDrop, num); } } public PickupIndex GenerateDropPreReplacement(Xoroshiro128Plus rng, int count) { //IL_0064: Unknown result type (might be due to invalid IL or missing references) selector.Clear(); AddNew(Run.instance.availableTier1DropList, tier1Weight); AddNew(Run.instance.availableTier2DropList, tier2Weight * (float)count); AddNew(Run.instance.availableTier3DropList, tier3Weight * Mathf.Pow((float)count, 1.75f)); return PickupDropTable.GenerateDropFromWeightedSelection(rng, selector); } public override int GetPickupCount() { return selector.Count; } public override PickupIndex[] GenerateUniqueDropsPreReplacement(int maxDrops, Xoroshiro128Plus rng) { return PickupDropTable.GenerateUniqueDropsFromWeightedSelection(maxDrops, rng, selector); } } private const string token = "SS2_ITEM_RELICOFTERMINATION_DESC"; [RooConfigurableField("SS2.Items", ConfigDesc = "Time, in seconds, to kill the marked enemy before going on cooldown.")] [TokenModifier(/*Could not decode attribute arguments.*/)] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float maxTime = 30f; [RooConfigurableField("SS2.Items", ConfigDesc = "Percent reduction in time to kill per stack. (1 = 100% reduction, .1 = 10% reduction)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float timeReduction = 0.1f; [RooConfigurableField("SS2.Items", ConfigDesc = "Damage multiplier which is added to the marked enemy. (1 = 100% more damage).")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float damageMult = 1.5f; [RooConfigurableField("SS2.Items", ConfigDesc = "Health multiplier which is added to the marked enemy. (1 = 100% more health).")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float hpMult = 2.5f; [RooConfigurableField("SS2.Items", ConfigDesc = "Flat additional health which is added to the marked enemy. (1 = 100% more health).")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float hpAdd = 225f; [RooConfigurableField("SS2.Items", ConfigDesc = "Speed multiplier which is added to the marked enemy. (1 = 100% more speed).")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float speedMult = 0.5f; [RooConfigurableField("SS2.Items", ConfigDesc = "Attack speed multiplier which is added to the marked enemy. (1 = 100% more attack speed).")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float atkSpeedMult = 1f; [RooConfigurableField("SS2.Items", ConfigDesc = "Scale multiplier applied to marked enemies. (1 = 100% of normal scale (no change)).")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float scaleMod = 1.5f; private static List illegalMarks = new List(); public static GameObject globalMarkEffectTwo; public static GameObject spawnRock1VFX; public static GameObject spawnRock2VFX; public static GameObject deathHalo; public static GameObject markEffect; public static GameObject failEffect; public static GameObject buffEffect; public static Xoroshiro128Plus terminationRNG; private TerminationDropTable dropTable; private List bossOptions; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("RelicOfTermination", SS2Bundle.Items); public override void Initialize() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown CharacterBody.onBodyStartGlobal += TerminationSpawnHook; GlobalEventManager.onCharacterDeathGlobal += TerminationDeathHook; Util.GetBestBodyName += new hook_GetBestBodyName(AddTerminalName); Inventory.onInventoryChangedGlobal += CheckTerminationBuff; TeamComponent.SetupIndicator += new hook_SetupIndicator(OverrideTerminalBossMarker); markEffect = SS2Assets.LoadAsset("RelicOfTerminationTargetMark", SS2Bundle.Items); failEffect = SS2Assets.LoadAsset("NemmandoScepterSlashAppear", SS2Bundle.Nemmando); buffEffect = SS2Assets.LoadAsset("RelicOfTerminationBuffEffect", SS2Bundle.Items); deathHalo = SS2Assets.LoadAsset("TerminationDeathHalo", SS2Bundle.Items); globalMarkEffectTwo = SS2Assets.LoadAsset("TerminationPositionIndicator", SS2Bundle.Items); spawnRock1VFX = SS2Assets.LoadAsset("TerminationDebris1", SS2Bundle.Items); spawnRock2VFX = SS2Assets.LoadAsset("TerminationDebris2", SS2Bundle.Items); dropTable = ScriptableObject.CreateInstance(); bossOptions = new List(); } private void OverrideTerminalBossMarker(orig_SetupIndicator orig, TeamComponent self) { if (Object.op_Implicit((Object)(object)self.body) && Object.op_Implicit((Object)(object)self.body.inventory) && self.body.inventory.GetItemCount(SS2Content.Items.TerminationHelper) > 0 && (Object)(object)((Component)self).gameObject.GetComponent() == (Object)null) { self.indicator = Object.Instantiate(globalMarkEffectTwo, ((Component)self).transform); self.indicator.GetComponent().targetTransform = self.body.coreTransform; Nameplate component = self.indicator.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.SetBody(self.body); } ((Component)self).gameObject.AddComponent(); } else { orig.Invoke(self); } } private void CheckTerminationBuff(Inventory obj) { if (!Object.op_Implicit((Object)(object)obj)) { return; } CharacterMaster component = ((Component)obj).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } CharacterBody body = component.GetBody(); if (Object.op_Implicit((Object)(object)body) && obj.GetItemCount(SS2Content.Items.RelicOfTermination) == 0 && body.HasBuff(SS2Content.Buffs.BuffTerminationReady)) { body.RemoveBuff(SS2Content.Buffs.BuffTerminationReady); TerminationHolderToken component2 = ((Component)body).GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { Object.Destroy((Object)(object)component2); } } } private void TerminationDeathHook(DamageReport obj) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Invalid comparison between Unknown and I4 //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: 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_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_0157: 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_018d: Expected O, but got Unknown //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) TerminationToken component = ((Component)obj.victimBody).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } CharacterBody body = component.owner.body; if ((int)obj.attackerTeamIndex == -1) { return; } float initalTime = component.initalTime; float time = Time.time; if (body.HasBuff(SS2Content.Buffs.BuffTerminationFailed)) { body.RemoveBuff(SS2Content.Buffs.BuffTerminationFailed); } float timeLimit = component.owner.target.timeLimit; component.owner.target = null; Transform val = obj.victimBody.transform.Find("TerminationPositionIndicator(Clone)"); if (Object.op_Implicit((Object)(object)val)) { PositionIndicator component2 = ((Component)val).GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { GameObject insideViewObject = component2.insideViewObject; if (Object.op_Implicit((Object)(object)insideViewObject)) { Transform[] componentsInChildren = insideViewObject.GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { ((Component)componentsInChildren[i]).gameObject.SetActive(false); } } if (Object.op_Implicit((Object)(object)component2.outsideViewObject)) { Transform[] componentsInChildren = insideViewObject.GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { ((Component)componentsInChildren[i]).gameObject.SetActive(false); } } } } if (time - initalTime > timeLimit) { return; } int itemCount = component.itemCount; Vector3 val2 = Quaternion.AngleAxis(0f, Vector3.up) * (Vector3.up * 20f); if ((Object)(object)dropTable == (Object)null) { dropTable = ScriptableObject.CreateInstance(); } if (terminationRNG == null) { terminationRNG = new Xoroshiro128Plus(Run.instance.seed); } if (component.isBoss) { DeathRewards val3 = (((Object)(object)obj.victimBody != (Object)null) ? ((Component)obj.victimBody).GetComponent() : null); if (Object.op_Implicit((Object)(object)val3)) { PickupDropletController.CreatePickupDroplet(val3.bossDropTable.GenerateDrop(terminationRNG), ((Component)obj.victim).transform.position, val2); return; } if (bossOptions.Count == 0) { foreach (PickupIndex availableBossDrop in Run.instance.availableBossDropList) { bossOptions.Add(availableBossDrop); } } Util.ShuffleList(bossOptions); PickupDropletController.CreatePickupDroplet(bossOptions[0], ((Component)obj.victim).transform.position, val2); } else { PickupDropletController.CreatePickupDroplet(dropTable.GenerateDropPreReplacement(terminationRNG, itemCount), ((Component)obj.victim).transform.position, val2); } } private void TerminationSpawnHook(CharacterBody obj) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Invalid comparison between Unknown and I4 //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Expected O, but got Unknown //IL_01e4: Unknown result type (might be due to invalid IL or missing references) if (illegalMarks.Contains(obj.bodyIndex) || obj.isPlayerControlled || (int)obj.teamComponent.teamIndex == 1 || (int)obj.teamComponent.teamIndex == 0 || (Object.op_Implicit((Object)(object)obj.inventory) && obj.inventory.GetItemCount(SS2Content.Items.Cognation) > 0)) { return; } foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { if (!Object.op_Implicit((Object)(object)instance) || !Object.op_Implicit((Object)(object)instance.master)) { continue; } CharacterBody body = instance.master.GetBody(); if (!Object.op_Implicit((Object)(object)body) || !body.HasBuff(SS2Content.Buffs.BuffTerminationReady)) { continue; } TerminationHolderToken terminationHolderToken = ((Component)body).GetComponent(); if (!Object.op_Implicit((Object)(object)terminationHolderToken)) { terminationHolderToken = ((Component)body).gameObject.AddComponent(); } if (!Object.op_Implicit((Object)(object)obj.inventory) || Object.op_Implicit((Object)(object)terminationHolderToken.target)) { continue; } int num = MSUtil.GetItemCount(body, SS2Content.Items.RelicOfTermination); if (num == 0) { num = 1; } TerminationToken terminationToken = ((Component)obj).gameObject.AddComponent(); terminationToken.itemCount = num; terminationToken.initalTime = Time.time; terminationToken.owner = terminationHolderToken; terminationHolderToken.target = terminationToken; terminationHolderToken.body = body; float num2 = Mathf.Pow(1f - timeReduction, (float)(terminationToken.itemCount - 1)); float num3 = maxTime * num2; if (obj.isBoss) { terminationToken.isBoss = true; num3 *= 2f; } terminationToken.timeLimit = num3; if (NetworkServer.active) { obj.AddBuff(SS2Content.Buffs.BuffTerminationVFX); obj.inventory.GiveItem(SS2Content.Items.TerminationHelper, 1); EffectData val = new EffectData { origin = obj.transform.position, scale = 0.5f }; EffectManager.SpawnEffect(spawnRock1VFX, val, true); for (int i = 0; (float)i < Mathf.Ceil(num3); i++) { body.AddTimedBuff(SS2Content.Buffs.BuffTerminationCooldown.buffIndex, (float)(i + 1)); } body.RemoveBuff(SS2Content.Buffs.BuffTerminationReady); } break; } } private string AddTerminalName(orig_GetBestBodyName orig, GameObject bodyObject) { string text = orig.Invoke(bodyObject); CharacterBody val = ((bodyObject != null) ? bodyObject.GetComponent() : null); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.inventory) && val.inventory.GetItemCount(SS2Content.Items.TerminationHelper) > 0) { text = Language.GetStringFormatted("SS2_ITEM_RELICOFTERMINATION_PREFIX", new object[1] { text }); } return text; } } public sealed class ArmedBackpack : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IOnTakeDamageServerReceiver { [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.ArmedBackpack; } public void OnTakeDamageServer(DamageReport damageReport) { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Invalid comparison between Unknown and I4 //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Invalid comparison between Unknown and I4 //IL_0094: 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) if (base.stack <= 0 || !(damageReport.damageDealt > 0f)) { return; } float num = damageReport.damageDealt / damageReport.victim.fullCombinedHealth * 100f * procMult; CharacterBody victimBody = damageReport.victimBody; if (Util.CheckRoll((num > procMinimum) ? num : procMinimum, victimBody.master)) { float num2 = backpackDamageCoeff * (float)base.stack; float num3 = victimBody.damage * num2; TeamIndex attackerTeamIndex = damageReport.attackerTeamIndex; GameObject val = damageReport.attacker; if ((int)attackerTeamIndex == -1 || (int)attackerTeamIndex == 1) { val = null; } MissileUtils.FireMissile(victimBody.corePosition, victimBody, ignoredProcs, val, num3, Util.CheckRoll(victimBody.crit, victimBody.master), CommonAssets.missilePrefab, (DamageColorIndex)3, false); } } } [RooConfigurableField("SS2.Items", ConfigDesc = "Damage dealt by the missle per stack. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float backpackDamageCoeff = 4f; [RooConfigurableField("SS2.Items", ConfigDesc = "Proc multiplier per percentage of health lost. (1 = 100% of health fraction lost)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float procMult = 2.5f; [RooConfigurableField("SS2.Items", ConfigDesc = "Minimum chance for fired missile. (1 = 1% chance)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float procMinimum = 0f; public static ProcChainMask ignoredProcs; public GameObject missilePrefab; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("ArmedBackpack", SS2Bundle.Items); } public sealed class CoffeeBag : ItemBase { public const string token = "SS2_ITEM_COFFEEBAG_DESC"; [RooConfigurableField("SS2.Items", ConfigDesc = "Duration of the buff gained upon using an interactable.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float interactBuff = 15f; [RooConfigurableField("SS2.Items", ConfigDesc = "Attack speed bonus granted per stack while the buff is active. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float atkSpeedBonus = 0.225f; [RooConfigurableField("SS2.Items", ConfigDesc = "Movement speed bonus granted per stack while the buff is active. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float moveSpeedBonus = 0.21f; [RooConfigurableField("SS2.Items", ConfigDesc = "Max duration of buff, per stack. (1 = 1 second)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float maxDurationStacking = 15f; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("CoffeeBag", SS2Bundle.Items); public override void Initialize() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown GlobalEventManager.OnInteractionBegin += new hook_OnInteractionBegin(CoffeeBagBuff); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(CalculateStatsCoffeeBag); } private void CalculateStatsCoffeeBag(CharacterBody sender, StatHookEventArgs args) { if (sender.GetBuffCount(SS2Content.Buffs.BuffCoffeeBag) > 0) { MSUtil.GetItemCount(sender, SS2Content.Items.CoffeeBag); args.attackSpeedMultAdd += atkSpeedBonus; args.moveSpeedMultAdd += moveSpeedBonus; } } private void CoffeeBagBuff(orig_OnInteractionBegin orig, GlobalEventManager self, Interactor interactor, IInteractable interactable, GameObject interactableObject) { orig.Invoke(self, interactor, interactable, interactableObject); CharacterBody component = ((Component)interactor).GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory) && component.inventory.GetItemCount(SS2Content.Items.CoffeeBag) > 0 && SS2Util.CheckIsValidInteractable(interactable, interactableObject)) { ApplyCoffeeBagBuff(component); } } private void ApplyCoffeeBagBuff(CharacterBody cb) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) int buffCount = cb.GetBuffCount(SS2Content.Buffs.BuffCoffeeBag); int num = 0; for (int i = buffCount; (float)i < maxDurationStacking * (float)MSUtil.GetItemCount(cb, SS2Content.Items.CoffeeBag); i++) { num++; cb.AddTimedBuffAuthority(SS2Content.Buffs.BuffCoffeeBag.buffIndex, (float)(i + 1)); if (num >= 15) { break; } } } } public sealed class DetritiveTrematode : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IOnDamageDealtServerReceiver { [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.DetritiveTrematode; } public void OnDamageDealtServer(DamageReport report) { //IL_0036: 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_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //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) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) HealthComponent victim = report.victim; GameObject attacker = report.attacker; DotController val = DotController.FindDotController(((Component)victim).gameObject); bool flag = false; if (Object.op_Implicit((Object)(object)val)) { flag = val.HasDotActive(Trematodes.index); } if (victim.body.bodyIndex != BodyCatalog.FindBodyIndexCaseInsensitive("ArtifactShellBody") && victim.combinedHealthFraction < missingHealthPercentage && !flag && (Object)(object)((Component)victim).gameObject != (Object)(object)attacker) { InflictDotInfo val2 = default(InflictDotInfo); val2.attackerObject = attacker; val2.victimObject = ((Component)victim).gameObject; val2.dotIndex = Trematodes.index; val2.duration = -1f; val2.damageMultiplier = trematodeDamage * (float)base.stack; InflictDotInfo val3 = val2; DotController.InflictDot(ref val3); } } } private const string token = "SS2_ITEM_DETRITIVETREMATODE_DESC"; [RooConfigurableField("SS2.Items", ConfigName = "Trematode Threshold", ConfigDesc = "Amount of missing health needed for Trematode to proc. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float missingHealthPercentage = 0.25f; [RooConfigurableField("SS2.Items", ConfigDesc = "Damage dealt by the Trematode debuff, per second. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float trematodeDamage = 1f; [RooConfigurableField("SS2.Items", ConfigDesc = "Movement speed reduction received from the Trematode debuff. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float trematodeSlow = 0.2f; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("DetritiveTrematode", SS2Bundle.Items); } [DisabledContent] public sealed class Diary : ItemBase { public sealed class Behavior : BaseItemMasterBehavior { private struct TimedExpOffset { public float awardTime; public long offset; } public class DiarySFXMessage : INetMessage, ISerializableObject { private NetworkInstanceId BodyObjectID; public DiarySFXMessage() { } public DiarySFXMessage(NetworkInstanceId bodyObjectID) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) BodyObjectID = bodyObjectID; } public void Serialize(NetworkWriter writer) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) writer.Write(BodyObjectID); } public void Deserialize(NetworkReader reader) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) BodyObjectID = reader.ReadNetworkId(); } public void OnReceived() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { GameObject val = Util.FindNetworkObject(BodyObjectID); if (Object.op_Implicit((Object)(object)val)) { PlayDiarySFXLocal(val); } } } } private bool expectBossKill; private float localTime; private List pendingOffsets = new List(); private float nextAward; public static void PlayDiarySFXLocal(GameObject holderBodyobject) { if (!Object.op_Implicit((Object)(object)holderBodyobject)) { return; } List instancesList = UICamera.instancesList; for (int i = 0; i < instancesList.Count; i++) { CameraRigController cameraRigController = instancesList[i].cameraRigController; if (Object.op_Implicit((Object)(object)cameraRigController) && Object.op_Implicit((Object)(object)cameraRigController.viewer) && ((NetworkBehaviour)cameraRigController.viewer).hasAuthority && (Object)(object)cameraRigController.target == (Object)(object)holderBodyobject) { Util.PlaySound("DiaryLevelUp", holderBodyobject); break; } } } [ItemDefAssociation(useOnClient = false, useOnServer = true)] private static ItemDef GetItemDef() { return SS2Content.Items.Diary; } private void AddPendingOffset(float awardTime, long awardAmount) { pendingOffsets.Add(new TimedExpOffset { awardTime = awardTime, offset = awardAmount }); if (nextAward > awardTime) { nextAward = awardTime; } } private void FixedUpdate() { //IL_00b8: Unknown result type (might be due to invalid IL or missing references) localTime += Time.fixedDeltaTime; if (pendingOffsets.Count <= 0 || !(nextAward <= localTime)) { return; } nextAward = float.PositiveInfinity; for (int num = pendingOffsets.Count - 1; num >= 0; num--) { TimedExpOffset timedExpOffset = pendingOffsets[num]; if (timedExpOffset.awardTime <= localTime) { base.master.SS2OffsetExperience(timedExpOffset.offset, transmitToClients: true); pendingOffsets.RemoveAt(num); if (base.master.hasBody) { GameObject bodyObject = base.master.GetBodyObject(); PlayDiarySFXLocal(bodyObject); NetworkIdentity component = bodyObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { NetMessageExtensions.Send((INetMessage)(object)new DiarySFXMessage(component.netId), (NetworkDestination)1); } } } else if (timedExpOffset.awardTime < nextAward) { nextAward = timedExpOffset.awardTime; } } } private void OnEnable() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown ExperienceManager.AwardExperience += new hook_AwardExperience(ExperienceManager_AwardExperience); DeathRewards.OnKilledServer += new hook_OnKilledServer(DeathRewards_OnKilledServer); } private void ExperienceManager_AwardExperience(orig_AwardExperience orig, ExperienceManager self, Vector3 origin, CharacterBody body, ulong amount) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, origin, body, amount); if (!expectBossKill) { return; } List list = self.CalculateDenominations(amount); uint num = 0u; for (int i = 0; i < list.Count; i++) { AddPendingOffset(localTime + 0.5f + 1.5f * ExperienceManager.orbTimeOffsetSequence[num], Mathf.CeilToInt((float)list[i] * experienceBonus * (float)stack)); num++; if ((ulong)num >= (ulong)ExperienceManager.orbTimeOffsetSequence.Length) { num = 0u; } } } private void DeathRewards_OnKilledServer(orig_OnKilledServer orig, DeathRewards self, DamageReport damageReport) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) expectBossKill = Object.op_Implicit((Object)(object)self.characterBody) && self.characterBody.isBoss && damageReport.attackerTeamIndex == base.master.teamIndex; orig.Invoke(self, damageReport); expectBossKill = false; } private void OnDisable() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown ExperienceManager.AwardExperience -= new hook_AwardExperience(ExperienceManager_AwardExperience); DeathRewards.OnKilledServer -= new hook_OnKilledServer(DeathRewards_OnKilledServer); } } private const string token = "SS2_ITEM_DIARY_DESC"; [RooConfigurableField("SS2.Items", ConfigDesc = "Experience bonus from each diary. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float experienceBonus = 1f; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("Diary", SS2Bundle.Items); public override void Initialize() { ((ContentBase)this).Initialize(); NetworkingAPI.RegisterMessageType(); } } [DisabledContent] public sealed class DormantFungus : ItemBase { public sealed class Behavior : BaseItemBodyBehavior { private float timer; private float sprintTimer; private ModifiedFootstepHandler footstepHandler; private Mesh[] mesh = (Mesh[])(object)new Mesh[0]; private bool hasFootsteps; [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.DormantFungus; } public void Start() { if (Object.op_Implicit((Object)(object)((Component)((BaseItemBodyBehavior)this).body.modelLocator.modelTransform).GetComponent())) { footstepHandler = ((Component)((BaseItemBodyBehavior)this).body.modelLocator.modelTransform).gameObject.AddComponent(); footstepHandler.footstepEffect = SS2Assets.LoadAsset("DungusTrailEffect", SS2Bundle.Items); footstepHandler.enableFootstepDust = false; hasFootsteps = true; } } public void FixedUpdate() { //IL_0093: 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) if (((BaseItemBodyBehavior)this).body.isSprinting) { if (Object.op_Implicit((Object)(object)footstepHandler) && sprintTimer > 1f) { footstepHandler.enableFootstepDust = true; } timer += Time.fixedDeltaTime; sprintTimer += Time.fixedDeltaTime; if (!(timer >= 1f)) { return; } if (NetworkServer.active) { ((BaseItemBodyBehavior)this).body.healthComponent.HealFraction(baseHealPercentage + stackHealPercentage * (float)(base.stack - 1), default(ProcChainMask)); } timer = 0f; if (hasFootsteps) { if (Run.instance.runRNG.nextBool) { footstepHandler.footstepEffect = SS2Assets.LoadAsset("DungusTrailEffect", SS2Bundle.Items); } else { footstepHandler.footstepEffect = SS2Assets.LoadAsset("DungusTrailEffectAlt", SS2Bundle.Items); } } } else { if (hasFootsteps) { footstepHandler.enableFootstepDust = false; } timer = 0f; sprintTimer = 0f; } } public void OnDestroy() { Object.Destroy((Object)(object)footstepHandler); } } private const string token = "SS2_ITEM_DORMANTFUNGUS_DESC"; [RooConfigurableField("SS2.Items", ConfigDesc = "Base amount of healing. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float baseHealPercentage = 0.01f; [RooConfigurableField("SS2.Items", ConfigDesc = "Amount of healing per stack. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float stackHealPercentage = 0.01f; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("DormantFungus", SS2Bundle.Items); public override void Initialize() { ((ContentBase)this).Initialize(); } } public sealed class Fork : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IBodyStatArgModifier { [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.Fork; } public void ModifyStatArguments(StatHookEventArgs args) { args.baseDamageAdd += damageBonus * (float)base.stack; } } [RooConfigurableField("SS2.Items", ConfigDesc = "Bonus base damage per fork. (1 = 1 base damage. Base damage for most characters is 12.)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float damageBonus = 2f; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("Fork", SS2Bundle.Items); } public sealed class Malice : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IOnDamageDealtServerReceiver { public class MaliceOrb : Orb { public float damageValue; public GameObject attacker; public GameObject inflictor; public int bouncesRemaining; public List bouncedObjects; public TeamIndex teamIndex; public bool isCrit; public ProcChainMask procChainMask; public float procCoefficient = 1f; public DamageColorIndex damageColorIndex; public float baseRange = 20f; public float damageCoefficientPerBounce = 1f; public DamageType damageType; private BullseyeSearch search; public override void Begin() { //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_0012: 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_0029: Expected O, but got Unknown ((Orb)this).duration = 0.2f; EffectData val = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration }; val.SetHurtBoxReference(base.target); EffectManager.SpawnEffect(maliceOrbEffectPrefab, val, true); } public override void OnArrival() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_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_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)base.target)) { return; } HealthComponent healthComponent = base.target.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent)) { DamageInfo val = new DamageInfo(); val.damage = damageValue; val.attacker = attacker; val.inflictor = inflictor; val.force = Vector3.zero; val.crit = isCrit; val.procChainMask = procChainMask; val.procCoefficient = procCoefficient; val.position = ((Component)base.target).transform.position; val.damageColorIndex = damageColorIndex; val.damageType = damageType; DamageAPI.AddModdedDamageType(val, maliceDamageType); healthComponent.TakeDamage(val); GlobalEventManager.instance.OnHitEnemy(val, ((Component)healthComponent).gameObject); GlobalEventManager.instance.OnHitAll(val, ((Component)healthComponent).gameObject); } if (bouncesRemaining > 0) { if (bouncedObjects != null) { bouncedObjects.Add(base.target.healthComponent); } HurtBox val2 = PickNextTarget(((Component)base.target).transform.position, healthComponent); if (Object.op_Implicit((Object)(object)val2)) { MaliceOrb maliceOrb = new MaliceOrb(); maliceOrb.search = search; ((Orb)maliceOrb).origin = ((Component)base.target).transform.position; ((Orb)maliceOrb).target = val2; maliceOrb.attacker = attacker; maliceOrb.inflictor = inflictor; maliceOrb.teamIndex = teamIndex; maliceOrb.damageValue = damageValue * damageCoefficientPerBounce; maliceOrb.bouncesRemaining = bouncesRemaining - 1; maliceOrb.isCrit = isCrit; maliceOrb.bouncedObjects = bouncedObjects; maliceOrb.procChainMask = procChainMask; maliceOrb.procCoefficient = procCoefficient; maliceOrb.damageColorIndex = damageColorIndex; maliceOrb.damageCoefficientPerBounce = damageCoefficientPerBounce; maliceOrb.baseRange = baseRange; maliceOrb.damageType = damageType; OrbManager.instance.AddOrb((Orb)(object)maliceOrb); } } } public HurtBox PickNextTarget(Vector3 position, HealthComponent currentVictim) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown //IL_0043: 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_004f: 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) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) if (search == null) { search = new BullseyeSearch(); } float num = baseRange; if (Object.op_Implicit((Object)(object)currentVictim) && Object.op_Implicit((Object)(object)currentVictim.body)) { num += currentVictim.body.radius; } search.searchOrigin = position; search.searchDirection = Vector3.zero; search.teamMaskFilter = TeamMask.allButNeutral; ((TeamMask)(ref search.teamMaskFilter)).RemoveTeam(teamIndex); search.filterByLoS = false; search.sortMode = (SortMode)1; search.maxDistanceFilter = num; search.RefreshCandidates(); HurtBox val = (from v in search.GetResults() where !bouncedObjects.Contains(v.healthComponent) select v).FirstOrDefault(); if (Object.op_Implicit((Object)(object)val)) { bouncedObjects.Add(val.healthComponent); } return val; } } [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.Malice; } public void OnDamageDealtServer(DamageReport report) { //IL_0049: 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_00b0: 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_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_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_0118: Unknown result type (might be due to invalid IL or missing references) DamageInfo damageInfo = report.damageInfo; if (damageInfo.procCoefficient > 0f && Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)this).body.teamComponent) && (damageInfo.procChainMask.mask & ~ignoredProcs.mask) == 0 && !DamageAPI.HasModdedDamageType(damageInfo, maliceDamageType)) { MaliceOrb maliceOrb = new MaliceOrb(); maliceOrb.bouncesRemaining = bounceStack * base.stack - 1; maliceOrb.baseRange = radiusBase; maliceOrb.damageCoefficientPerBounce = 1f; maliceOrb.damageValue = damageInfo.damage * damageCoeff; maliceOrb.damageType = (DamageType)0; maliceOrb.isCrit = damageInfo.crit; maliceOrb.damageColorIndex = (DamageColorIndex)9; maliceOrb.procCoefficient = procCo; ((Orb)maliceOrb).origin = report.victimBody.corePosition; maliceOrb.teamIndex = ((BaseItemBodyBehavior)this).body.teamComponent.teamIndex; maliceOrb.attacker = ((Component)this).gameObject; maliceOrb.procChainMask = damageInfo.procChainMask; maliceOrb.bouncedObjects = new List { report.victim }; HurtBox val = maliceOrb.PickNextTarget(damageInfo.position, report.victim); if (Object.op_Implicit((Object)(object)val)) { ((Orb)maliceOrb).target = val; OrbManager.instance.AddOrb((Orb)(object)maliceOrb); } } } } private const string token = "SS2_ITEM_MALICE_DESC"; [RooConfigurableField("SS2.Items", ConfigDesc = "Radius of Malice, in meters.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float radiusBase = 13f; [RooConfigurableField("SS2.Items", ConfigDesc = "Total damage each Malice bounce deals. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float damageCoeff = 0.35f; [RooConfigurableField("SS2.Items", ConfigDesc = "Number of bounces per stack.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static int bounceStack = 1; [RooConfigurableField("SS2.Items", ConfigDesc = "Proc coefficient of damage dealt by Malice.")] public static float procCo = 0.2f; public static ModdedDamageType maliceDamageType; public static ProcChainMask ignoredProcs; public static GameObject maliceOrbEffectPrefab; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("Malice", SS2Bundle.Items); public override void Initialize() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((ContentBase)this).Initialize(); maliceDamageType = DamageAPI.ReserveDamageType(); ((ProcChainMask)(ref ignoredProcs)).AddProc((ProcType)17); maliceOrbEffectPrefab = SS2Assets.LoadAsset("MaliceOrbEffect", SS2Bundle.Items); } } public sealed class MoltenCoin : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IOnDamageDealtServerReceiver { [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.MoltenCoin; } public void OnDamageDealtServer(DamageReport report) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) if (Util.CheckRoll(procChance, ((BaseItemBodyBehavior)this).body.master) && report.damageInfo.procCoefficient > 0f) { InflictDotInfo val = default(InflictDotInfo); val.attackerObject = ((Component)((BaseItemBodyBehavior)this).body).gameObject; val.victimObject = ((Component)report.victim).gameObject; val.dotIndex = (DotIndex)1; val.duration = report.damageInfo.procCoefficient * 4f; val.damageMultiplier = (float)base.stack * damageCoeff; InflictDotInfo val2 = val; StrengthenBurnUtils.CheckDotForUpgrade(report.attackerBody.inventory, ref val2); DotController.InflictDot(ref val2); ((BaseItemBodyBehavior)this).body.master.GiveMoney((uint)((float)base.stack * ((float)Run.instance.stageClearCount + (float)coinGain * 1f))); MSUtil.PlayNetworkedSFX("MoltenCoin", ((Component)report.victim).gameObject.transform.position, true); EffectManager.SimpleImpactEffect(AssetReferences.gainCoinsImpactEffectPrefab, report.victimBody.transform.position, Vector3.up, true); } } } [RooConfigurableField("SS2.Items", ConfigDesc = "Chance for Molten Coin to Proc. (100 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float procChance = 6f; [RooConfigurableField("SS2.Items", ConfigDesc = "Base Damage per stack. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float damageCoeff = 1f; [RooConfigurableField("SS2.Items", ConfigDesc = "Coin gain on proc. Scales with time. (1 = 1$)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static int coinGain = 1; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("MoltenCoin", SS2Bundle.Items); } public sealed class Needles : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IOnIncomingDamageOtherServerReciever { [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.Needles; } public void OnIncomingDamageOther(HealthComponent self, DamageInfo damageInfo) { //IL_0047: 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) if (!Object.op_Implicit((Object)(object)damageInfo.attacker)) { return; } CharacterBody component = damageInfo.attacker.GetComponent(); if (!Object.op_Implicit((Object)(object)component) || damageInfo.rejected || !NetworkServer.active || self.body.teamComponent.teamIndex == component.teamComponent.teamIndex) { return; } int buffCount = self.body.GetBuffCount(SS2Content.Buffs.BuffNeedleBuildup); float num = component.crit + (float)buffCount * bonusCrit; bool flag = Util.CheckRoll((component.crit - num) / (component.crit - 100f) * 100f, 0f, (CharacterMaster)null); if (flag && damageInfo.procCoefficient > 0f) { doNeedleProc(self); damageInfo.crit = flag; return; } num = component.crit + (float)buffCount * bonusCrit; flag = Util.CheckRoll((component.crit - num) / (component.crit - 100f) * 100f, 0f, (CharacterMaster)null); if (flag && damageInfo.procCoefficient > 0f) { damageInfo.crit = flag; doNeedleProc(self); } else if (component.crit < 100f) { if (!Object.op_Implicit((Object)(object)((Component)self.body).gameObject.GetComponent())) { NeedleTracker needleTracker = ((Component)self.body).gameObject.AddComponent(); needleTracker.procs = MSUtil.GetItemCount(component, SS2Content.Items.Needles) * critsPerStack; needleTracker.max = needleTracker.procs; } if ((float)buffCount * bonusCrit + component.crit >= 100f) { doNeedleProc(self); } self.body.AddBuff(SS2Content.Buffs.BuffNeedleBuildup); } } public void doNeedleProc(HealthComponent self) { //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_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown NeedleTracker component = ((Component)self.body).gameObject.GetComponent(); int num = 0; if (Object.op_Implicit((Object)(object)component)) { component.procs--; } if (!Object.op_Implicit((Object)(object)component) || component.procs == 0) { if (Object.op_Implicit((Object)(object)component)) { Object.Destroy((Object)(object)component); } num = self.body.GetBuffCount(SS2Content.Buffs.BuffNeedleBuildup); for (int i = 0; i < num; i++) { self.body.RemoveBuff(SS2Content.Buffs.BuffNeedleBuildup); } } EffectData val = new EffectData { origin = self.body.corePosition }; EffectManager.SpawnEffect(needleStrikeVFX, val, true); for (float num2 = 1f; num2 < (float)num; num2 *= 2.5f) { EffectData val2 = new EffectData { origin = self.body.corePosition }; EffectManager.SpawnEffect(needleVFX, val2, true); } } } public class NeedleTracker : MonoBehaviour { public int procs; public int max; } private const string token = "SS2_ITEM_NEEDLES_DESC"; [RooConfigurableField("SS2.Items", ConfigDesc = "Amount of bonus critical chance per applied per stack of the debuff. (1 = 1%")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float bonusCrit = 2f; [RooConfigurableField("SS2.Items", ConfigDesc = "Amount of critical hits allowed per stack. (1 = 1 critical hit per stack before the buff is cleared)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static int critsPerStack = 1; public static GameObject needleStrikeVFX = SS2Assets.LoadAsset("NeedlesStrikeVFX", SS2Bundle.Items); public static GameObject needleVFX = SS2Assets.LoadAsset("NeedleVFX", SS2Bundle.Items); public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("Needles", SS2Bundle.Items); } [DisabledContent] public sealed class WonderHerbs : ItemBase { [RooConfigurableField("SS2.Items", ConfigDesc = "Bonus healing per herbs. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float healBonus = 0.8f; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("WonderHerbs", SS2Bundle.Items); public override void Initialize() { HealthComponent.onCharacterHealServer += BonusHeals; } private void BonusHeals(HealthComponent healthComponent, float healAmount, ProcChainMask procChainMask) { int itemCount = healthComponent.body.inventory.GetItemCount(((ItemBase)this).ItemDef); healAmount *= 1f + MSUtil.InverseHyperbolicScaling(healBonus, healBonus, 0.6f, itemCount); } } public sealed class X4 : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IStatItemBehavior { [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.X4; } public void Start() { ((BaseItemBodyBehavior)this).body.onSkillActivatedAuthority += X4HealOnSkillActivation; } private void X4HealOnSkillActivation(GenericSkill skill) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_015d: 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) CharacterBody characterBody = skill.characterBody; if (!Object.op_Implicit((Object)(object)characterBody) || !Object.op_Implicit((Object)(object)characterBody.inventory) || characterBody.inventory.GetItemCount(SS2Content.Items.X4.itemIndex) <= 0) { return; } if (specialSkillNames.TryGetValue(skill.skillDef.skillNameToken, out var value)) { if (value) { return; } } else { value = true; } if (!value || ((Object)(object)skill == (Object)(object)skill.characterBody.skillLocator.secondaryBonusStockSkill && skill.baseRechargeInterval != 0f)) { int num = skill.bonusStockFromBody + 1; if (!value) { GenericSkill secondaryBonusStockSkill = skill.characterBody.skillLocator.secondaryBonusStockSkill; if (skill.skillDef.skillNameToken == "SS2_EXECUTIONER2_IONBURST_NAME" && secondaryBonusStockSkill.skillNameToken == "SS2_EXECUTIONER2_IONCHARGE_NAME" && secondaryBonusStockSkill.stock <= 0) { return; } if (skill.skillDef.skillNameToken != secondaryBonusStockSkill.skillNameToken) { num = secondaryBonusStockSkill.bonusStockFromBody + 1; } } int buffCount = characterBody.GetBuffCount(SS2Content.Buffs.BuffX4); if (buffCount < num) { characterBody.AddTimedBuffAuthority(SS2Content.Buffs.BuffX4.buffIndex, regenDuration); } else if (buffCount == num && buffCount >= 1) { SS2Util.RefreshOldestBuffStack(characterBody, SS2Content.Buffs.BuffX4, regenDuration); } } else if ((Object)(object)skill == (Object)(object)skill.characterBody.skillLocator.secondaryBonusStockSkill) { characterBody.AddTimedBuffAuthority(SS2Content.Buffs.BuffX4.buffIndex, regenDuration); if (characterBody.GetBuffCount(SS2Content.Buffs.BuffX4) != 0) { characterBody.RemoveOldestTimedBuff(SS2Content.Buffs.BuffX4.buffIndex); } } } public void RecalculateStatsEnd() { if (Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)this).body.skillLocator) && Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)this).body.skillLocator.secondaryBonusStockSkill)) { float num = Mathf.Pow(1f - cdReduction, (float)base.stack); GenericSkill secondaryBonusStockSkill = ((BaseItemBodyBehavior)this).body.skillLocator.secondaryBonusStockSkill; secondaryBonusStockSkill.cooldownScale *= num; } } public void RecalculateStatsStart() { } private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody self, StatHookEventArgs args) { } } public static float secCooldown = 0.25f; [RooConfigurableField("SS2.Items", ConfigDesc = "Cooldown reduction per X-4 Stimulant. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float cdReduction = 0.1f; [RooConfigurableField("SS2.Items", ConfigDesc = "Regen boost when using secondary skill. (1 = 1hp/s)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float baseRegenBoost = 2f; [RooConfigurableField("SS2.Items", ConfigDesc = "Regen boost per stack when using secondary skill. (1 = 1hp/s)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float stackRegenBoost = 1f; [RooConfigurableField("SS2.Items", ConfigDesc = "Regen duration when using secondary skill. (1 = 1s)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float regenDuration = 3f; public static float extraRegeneration = 0.2f; public static ProcChainMask ignoredProcs; public static ItemDisplay itemDisplay; public static Dictionary specialSkillNames; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("X4", SS2Bundle.Items); public override void Initialize() { InitalizeSpecialSkillsList(); } public void InitalizeSpecialSkillsList() { specialSkillNames = new Dictionary { { "SS2_EXECUTIONER2_IONCHARGE_NAME", true }, { "SS2_EXECUTIONER2_IONBURST_NAME", false }, { "SS2_NEMCOMMANDO_SECONDARY_SHOOT_NAME", false }, { "RAILGUNNER_SECONDARY_NAME", true }, { "RAILGUNNER_SNIPE_HEAVY_NAME", false }, { "RAILGUNNER_SECONDARY_ALT_NAME", true }, { "RAILGUNNER_SNIPE_LIGHT_NAME", false } }; } } [DisabledContent] public sealed class BloodTester : ItemBase { public sealed class Behavior : BaseItemBodyBehavior { private float healAccum; private float stopwatch; private int totalCount; private int burstCount; private static float goldStagger = 0.5f; [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.BloodTester; } public void Start() { HealthComponent.onCharacterHealServer += AccumulateHeals; } private void AccumulateHeals(HealthComponent healthComponent, float healAmount, ProcChainMask procChainMask) { bool flag = !Object.op_Implicit((Object)(object)TeleporterInteraction.instance) || !TeleporterInteraction.instance.isCharged; if (((object)healthComponent.body).Equals((object?)((BaseItemBodyBehavior)this).body) && !Run.instance.isRunStopwatchPaused && flag) { if (healthComponent.health < healthComponent.body.maxHealth) { healAccum += healAmount; } healAccum = Mathf.Min(healAccum, healthComponent.fullHealth); } } private void FixedUpdate() { if (!NetworkServer.active) { return; } if (stopwatch > goldStagger) { if (healAccum >= healIncrement) { totalCount = Mathf.FloorToInt(healAccum / Mathf.Max(healIncrement, 1f)); burstCount = (int)Mathf.Min((float)totalCount * goldIncrement * (float)base.stack, (float)Run.instance.GetDifficultyScaledCost((int)goldIncrement * 2)); healAccum -= healIncrement * (float)burstCount; ((BaseItemBodyBehavior)this).body.master.GiveMoney((uint)(goldIncrement * (float)burstCount)); stopwatch = 0f; } } else { stopwatch += (stopwatch += Time.fixedDeltaTime); } } private void OnDestroy() { HealthComponent.onCharacterHealServer -= AccumulateHeals; } } private const string token = "SS2_ITEM_BLOODTESTER_DESC"; [RooConfigurableField("SS2.Items", ConfigDesc = "Amount of healing required per Blood Tester proc.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float healIncrement = 15f; [RooConfigurableField("SS2.Items", ConfigDesc = "Amount of gold given per Blood Tester proc. DOES NOT SCALE WITH LEVEL.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float goldIncrement = 2f; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("BloodTester", SS2Bundle.Items); } public sealed class FieldAccelerator : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IOnKilledOtherServerReceiver { [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.FieldAccelerator; } public void OnKilledOtherServer(DamageReport damageReport) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Invalid comparison between Unknown and I4 TeleporterInteraction instance = TeleporterInteraction.instance; if (Object.op_Implicit((Object)(object)instance)) { bool num = (Object)(object)damageReport.attackerBody == (Object)(object)((BaseItemBodyBehavior)this).body; bool flag = (int)instance.activationState == 2; bool monstersCleared = instance.monstersCleared; bool flag2 = instance.holdoutZoneController.IsBodyInChargingRadius(damageReport.victimBody); if (num && flag && monstersCleared && flag2) { HoldoutZoneController holdoutZoneController = instance.holdoutZoneController; holdoutZoneController.charge += MSUtil.InverseHyperbolicScaling(chargePerKill, chargePerKill, maxChargePerKill, base.stack); } } } } [RooConfigurableField("SS2.Items", ConfigDesc = "Amount of charge to add to the teleporter on kill. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float chargePerKill = 0.01f; [RooConfigurableField("SS2.Items", ConfigDesc = "Maximum Amount of Charge per kill. (1 = 100%)")] public static float maxChargePerKill = 0.05f; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("FieldAccelerator", SS2Bundle.Items); } [DisabledContent] public sealed class HottestSauce : ItemBase { public sealed class Behavior : BaseItemBodyBehavior { private static GameObject hotSauce; [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.HottestSauce; } public void Start() { EquipmentSlot.onServerEquipmentActivated += FireHotSauce; } private void FireHotSauce(EquipmentSlot slot, EquipmentIndex index) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: 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_004d: 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_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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0119: 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_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Expected O, but got Unknown //IL_014b: 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_019d: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)slot.characterBody != (Object)(object)((BaseItemBodyBehavior)this).body) { return; } MSUtil.PlayNetworkedSFX("HottestSauce", ((Component)this).gameObject.transform.position, true); List list = new List(); SphereSearch val = new SphereSearch(); val.ClearCandidates(); val.origin = ((BaseItemBodyBehavior)this).body.corePosition; val.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; val.radius = radius; val.RefreshCandidates(); val.FilterCandidatesByHurtBoxTeam(TeamMask.GetUnprotectedTeams(((BaseItemBodyBehavior)this).body.teamComponent.teamIndex)); val.FilterCandidatesByDistinctHurtBoxEntities(); val.GetHurtBoxes(list); foreach (HurtBox item in list) { if (Object.op_Implicit((Object)(object)item.healthComponent) && (Object)(object)item.healthComponent != (Object)(object)((BaseItemBodyBehavior)this).body.healthComponent) { DamageInfo val2 = new DamageInfo { attacker = ((Component)((BaseItemBodyBehavior)this).body).gameObject, position = ((Component)item.healthComponent).transform.position, crit = ((BaseItemBodyBehavior)this).body.RollCrit(), damage = ((BaseItemBodyBehavior)this).body.damage * 2f, procChainMask = default(ProcChainMask) }; item.healthComponent.TakeDamage(val2); InflictDotInfo val3 = default(InflictDotInfo); val3.attackerObject = ((Component)((BaseItemBodyBehavior)this).body).gameObject; val3.victimObject = ((Component)item.healthComponent).gameObject; val3.dotIndex = (DotIndex)1; val3.duration = DOTDuration; val3.damageMultiplier = 0.5f + (float)base.stack; InflictDotInfo val4 = val3; DotController.InflictDot(ref val4); } } } public void OnDestroy() { EquipmentSlot.onServerEquipmentActivated -= FireHotSauce; } } private const string token = "SS2_ITEM_HOTTESTSAUCE_DESC"; [RooConfigurableField("SS2.Items", ConfigDesc = "Radius in which the hottest sauce deals damage, in meters.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float radius = 30f; [RooConfigurableField("SS2.Items", ConfigDesc = "Duration of the burn effect, in seconds.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float DOTDuration = 6f; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("HottestSauce", SS2Bundle.Items); } public sealed class HuntersSigil : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IBodyStatArgModifier { private bool sigilActive; [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.HuntersSigil; } public void FixedUpdate() { //IL_002d: 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_0046: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } if (((BaseItemBodyBehavior)this).body.notMovingStopwatch > 1f) { if (!sigilActive) { EffectManager.SimpleEffect(effect, ((BaseItemBodyBehavior)this).body.aimOrigin + new Vector3(0f, 0f), Quaternion.identity, true); sigilActive = true; } ((BaseItemBodyBehavior)this).body.AddTimedBuff(SS2Content.Buffs.BuffSigil, baseLinger + stackLinger * ((float)base.stack - 1f)); } else { sigilActive = false; } } public void ModifyStatArguments(StatHookEventArgs args) { if (((BaseItemBodyBehavior)this).body.HasBuff(SS2Content.Buffs.BuffSigil)) { args.armorAdd += stackArmor * (float)(base.stack - 1); args.damageMultAdd += stackDamage * (float)(base.stack - 1); } } public void OnDestroy() { ((BaseItemBodyBehavior)this).body.ClearTimedBuffs(SS2Content.Buffs.BuffSigil); } } private const string token = "SS2_ITEM_HUNTERSSIGIL_DESC"; public static GameObject effect; [RooConfigurableField("SS2.Items", ConfigDesc = "Base amount of extra armor added.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float baseArmor = 20f; [RooConfigurableField("SS2.Items", ConfigDesc = "Amount of extra armor added per stack.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float stackArmor = 10f; [RooConfigurableField("SS2.Items", ConfigDesc = "Base amount of extra damage added. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float baseDamage = 0.2f; [RooConfigurableField("SS2.Items", ConfigDesc = "Amount of extra damage added per stack. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float stackDamage = 0.1f; [RooConfigurableField("SS2.Items", ConfigDesc = "Base time the buff lingers for after moving, in seconds.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float baseLinger = 2f; [RooConfigurableField("SS2.Items", ConfigDesc = "Amount of extra lingering time added per stack, in seconds.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float stackLinger = 1f; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("HuntersSigil", SS2Bundle.Items); public override void Initialize() { ((ContentBase)this).Initialize(); effect = SS2Assets.LoadAsset("SigilEffect", SS2Bundle.Items); } } public sealed class JetBoots : ItemBase { public sealed class Behavior : BaseItemBodyBehavior { private int blastTimes; private float radius; [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.JetBoots; } private void Restock(ref HitGroundInfo hitGroundInfo) { blastTimes = 0; } private void Start() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown if (NetworkServer.active) { if ((Object)(object)((BaseItemBodyBehavior)this).body.characterMotor != (Object)null) { ((BaseItemBodyBehavior)this).body.characterMotor.onHitGroundServer += new HitGroundDelegate(Restock); } } else if ((Object)(object)((BaseItemBodyBehavior)this).body.characterMotor != (Object)null) { ((BaseItemBodyBehavior)this).body.characterMotor.onHitGroundAuthority += new HitGroundDelegate(Restock); } } private void FixedUpdate() { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown if (((ButtonState)(ref ((BaseItemBodyBehavior)this).body.inputBank.jump)).justPressed && blastTimes < ((BaseItemBodyBehavior)this).body.maxJumpCount) { blastTimes++; radius = MSUtil.InverseHyperbolicScaling(baseRadius, stackRadius, maxRadius, base.stack); EffectData val = new EffectData { color = new Color32((byte)0, byte.MaxValue, (byte)0, (byte)150), scale = radius / 2f, origin = ((BaseItemBodyBehavior)this).body.footPosition }; EffectManager.SpawnEffect(JetBootsBlast, val, false); Blast(radius); } } private void Blast(float radius) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0038: 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) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_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) GameObject gameObject = ((Component)((BaseItemBodyBehavior)this).body).gameObject; float baseDamage = ((BaseItemBodyBehavior)this).body.damage * (JetBoots.baseDamage + stackDamage * (float)base.stack); new BlastAttack { attacker = gameObject, baseDamage = baseDamage, radius = radius, crit = ((BaseItemBodyBehavior)this).body.RollCrit(), falloffModel = (FalloffModel)0, procCoefficient = 0f, teamIndex = ((BaseItemBodyBehavior)this).body.teamComponent.teamIndex, position = gameObject.transform.position, damageType = (DamageType)8, attackerFiltering = (AttackerFiltering)2 }.Fire(); } private void OnDestroy() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown if (NetworkServer.active) { if ((Object)(object)((BaseItemBodyBehavior)this).body.characterMotor != (Object)null) { ((BaseItemBodyBehavior)this).body.characterMotor.onHitGroundServer -= new HitGroundDelegate(Restock); } } else if ((Object)(object)((BaseItemBodyBehavior)this).body.characterMotor != (Object)null) { ((BaseItemBodyBehavior)this).body.characterMotor.onHitGroundAuthority -= new HitGroundDelegate(Restock); } } } private const string token = "SS2_ITEM_JETBOOTS_DESC"; [RooConfigurableField("SS2.Items", ConfigDesc = "Base radius of Prototype Jet Boot's explosion, in meters.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float baseRadius = 7.5f; [RooConfigurableField("SS2.Items", ConfigDesc = "Stacking radius of Prototype Jet Boots' explosion, in meters.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float stackRadius = 2.5f; [RooConfigurableField("SS2.Items", ConfigDesc = "Maximum radius of Prototype Jet Boots' explosion, in meters.")] public static float maxRadius = 15f; [RooConfigurableField("SS2.Items", ConfigDesc = "Base damage of Prototype Jet Boots' explosion. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float baseDamage = 1.5f; [RooConfigurableField("SS2.Items", ConfigDesc = "Stacking damage of Prototype Jet Boots' explosion. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float stackDamage = 1f; public static GameObject JetBootsBlast; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("JetBoots", SS2Bundle.Items); public override void Initialize() { JetBootsBlast = PrefabAPI.InstantiateClone(Resources.Load("Prefabs/Effects/OmniEffect/OmniExplosionVFXCommandoGrenade"), "JetBootsBlast", false); Object.Destroy((Object)(object)((Component)JetBootsBlast.transform.Find("ScaledHitsparks 1")).gameObject); Object.Destroy((Object)(object)((Component)JetBootsBlast.transform.Find("UnscaledHitsparks 1")).gameObject); Object.Destroy((Object)(object)((Component)JetBootsBlast.transform.Find("Nova Sphere (1)")).gameObject); GameObject gameObject = ((Component)JetBootsBlast.transform.Find("Point Light")).gameObject; if (Object.op_Implicit((Object)(object)gameObject)) { Light component = gameObject.GetComponent(); SS2Log.Info("found lightobj"); if (Object.op_Implicit((Object)(object)component)) { SS2Log.Info("found light compontent"); component.intensity = 3f; } } ShakeEmitter component2 = JetBootsBlast.GetComponent(); component2.radius *= 0.5f; JetBootsBlast.GetComponent().soundName = "JetBootsExplosion"; JetBootsBlast.GetComponent().applyScale = true; ContentAddition.AddEffect(JetBootsBlast); ArrayUtils.ArrayAppend(ref ((ContentLoader)ContentLoader.Instance).SerializableContentPack.effectPrefabs, ref JetBootsBlast); } } public sealed class LowQualitySpeakers : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IBodyStatArgModifier, IOnIncomingDamageServerReceiver { public float missingHealthPercent; public float healthFraction; [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.LowQualitySpeakers; } public void ModifyStatArguments(StatHookEventArgs args) { args.baseMoveSpeedAdd += ((BaseItemBodyBehavior)this).body.baseMoveSpeed * (1f - healthFraction) * (float)Math.Pow(bonusMoveSpeed, 1 / base.stack); } public void OnIncomingDamageServer(DamageInfo damageInfo) { ((BaseItemBodyBehavior)this).body.RecalculateStats(); } private void FixedUpdate() { missingHealthPercent = 1f - ((BaseItemBodyBehavior)this).body.healthComponent.combinedHealthFraction; healthFraction = ((BaseItemBodyBehavior)this).body.healthComponent.combinedHealthFraction - 0.1f; if (((BaseItemBodyBehavior)this).body.healthComponent.combinedHealthFraction > 0.9f) { healthFraction = 1f; } if (((BaseItemBodyBehavior)this).body.healthComponent.combinedHealthFraction < 0f) { healthFraction = 0f; } } } private const string token = "SS2_ITEM_LOWQUALITYSPEAKERS_DESC"; [RooConfigurableField("SS2.Items", ConfigName = "Maximum Move Speed per Speaker", ConfigDesc = "Maximum amount of move speed per item held.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float bonusMoveSpeed = 0.6f; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("LowQualitySpeakers", SS2Bundle.Items); } [DisabledContent] public sealed class Roulette : ItemBase { public sealed class Behavior : BaseItemBodyBehavior { private float stopwatch; private static float checkTimer = 0.25f; [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.Roulette; } private void FixedUpdate() { if (NetworkServer.active) { stopwatch += Time.fixedDeltaTime; _ = stopwatch; _ = checkTimer; } } } private const string token = "SS2_ITEM_JETBOOTS_DESC"; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("Roulette", SS2Bundle.Items); } public sealed class WatchMetronome : ItemBase { public sealed class Behavior : BaseItemBodyBehavior { private const float buildCoefficient = 0.875f; private const float drainCoefficient = -1f; private const float notMoveBuffer = 0.6f; private float charges; [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.WatchMetronome; } public void FixedUpdate() { //IL_006a: Unknown result type (might be due to invalid IL or missing references) float num = Time.fixedDeltaTime * 0.75f * (float)base.stack; num = (((BaseItemBodyBehavior)this).body.isSprinting ? (num * -1f) : (num * 0.875f)); charges = Mathf.Clamp(charges + num, 0f, (float)(base.stack * chargeAmount)); if (NetworkServer.active) { ((BaseItemBodyBehavior)this).body.SetBuffCount(SS2Content.Buffs.BuffWatchMetronome.buffIndex, Mathf.RoundToInt(charges)); } } private void OnDestroy() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { ((BaseItemBodyBehavior)this).body.SetBuffCount(SS2Content.Buffs.BuffWatchMetronome.buffIndex, 0); } } } private const string token = "SS2_ITEM_WATCHMETRONOME_DESC"; [RooConfigurableField("SS2.Items", ConfigDesc = "Amount of max charges per stack.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static int chargeAmount = 5; [RooConfigurableField("SS2.Items", ConfigDesc = "Maximum movement speed bonus that can be achieved via metronome per stack. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float maxMovementSpeed = 2f; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("WatchMetronome", SS2Bundle.Items); } [DisabledContent] public sealed class BabyToys : ItemBase { public sealed class MasterBehavior : BaseItemMasterBehavior { public const float levelTextScaleAdjustment = 15f; private uint remainingLevelReduction; private int _stack; private List adjustedLevelText = new List(); public int bonusLevelCount => stack * levelReductionPerStack - (int)remainingLevelReduction; [ItemDefAssociation(useOnClient = true, useOnServer = true)] private static ItemDef GetItemDef() { return SS2Content.Items.BabyToys; } private void Start() { CheckStackChange(); } private void OnDestroy() { stack = 0; CheckStackChange(); } public void CheckStackChange() { if (_stack != stack) { int change = stack - _stack; _stack = stack; OnStackChanged(change); } } public void OnStackChanged(int change) { int num = change * levelReductionPerStack; BabyToyToken babyToyToken = ((Component)base.master.GetBody()).GetComponent(); if (!Object.op_Implicit((Object)(object)babyToyToken)) { babyToyToken = ((Component)base.master.GetBody()).gameObject.AddComponent(); } if (num > 0) { remainingLevelReduction += (uint)num; babyToyToken.remainingLevelReduction = remainingLevelReduction; TryReduceLevel(); } else if (num < 0) { remainingLevelReduction -= (uint)num; babyToyToken.remainingLevelReduction = remainingLevelReduction; TryIncreaseLevel(); } } private void TryIncreaseLevel() { ulong num = base.master.SS2GetAdjustedExperience(); uint num2 = TeamManager.FindLevelForExperience(num); uint num3 = num2 + remainingLevelReduction; ulong experienceForLevel = TeamManager.GetExperienceForLevel(num2); ulong experienceForLevel2 = TeamManager.GetExperienceForLevel(num2 + 1); ulong experienceForLevel3 = TeamManager.GetExperienceForLevel(num3); ulong experienceForLevel4 = TeamManager.GetExperienceForLevel(num3 + 1); double num4 = (double)(num - experienceForLevel) / (double)(experienceForLevel2 - experienceForLevel); long amount = (long)Math.Ceiling((double)experienceForLevel3 + (double)(experienceForLevel4 - experienceForLevel3) * num4) - (long)num; bool hasBody = base.master.hasBody; if (hasBody) { base.master.bodyInstanceObject.AddComponent(); } base.master.SS2OffsetExperience(amount); if (hasBody) { base.master.GetBody().RecalculateStats(); Object.Destroy((Object)(object)base.master.bodyInstanceObject.GetComponent()); } RefreshLevelText(); } public void TryReduceLevel() { ulong num = base.master.SS2GetAdjustedExperience(); uint num2 = TeamManager.FindLevelForExperience(num); uint num3 = num2 - remainingLevelReduction; if (num3 > num2 || num3 < 1) { num3 = 1u; } uint num4 = num2 - num3; if (num4 != 0) { remainingLevelReduction -= num4; BabyToyToken component = ((Component)base.master.GetBody()).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.remainingLevelReduction = remainingLevelReduction; } ulong experienceForLevel = TeamManager.GetExperienceForLevel(num2); ulong experienceForLevel2 = TeamManager.GetExperienceForLevel(num2 + 1); ulong experienceForLevel3 = TeamManager.GetExperienceForLevel(num3); ulong experienceForLevel4 = TeamManager.GetExperienceForLevel(num3 + 1); double num5 = (double)(num - experienceForLevel) / (double)(experienceForLevel2 - experienceForLevel); long amount = (long)Math.Ceiling((double)experienceForLevel3 + (double)(experienceForLevel4 - experienceForLevel3) * num5) - (long)num; base.master.SS2OffsetExperience(amount); if (base.master.hasBody) { base.master.GetBody().RecalculateStats(); } RefreshLevelText(); } } public void RefreshLevelText() { foreach (HUD readOnlyInstance in HUD.readOnlyInstanceList) { if ((Object)(object)readOnlyInstance.targetMaster == (Object)(object)base.master && Object.op_Implicit((Object)(object)readOnlyInstance.levelText)) { readOnlyInstance.levelText.displayData = uint.MaxValue; readOnlyInstance.levelText.Update(); } } } private void OnEnable() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown GlobalEventManager.onCharacterLevelUp += GlobalEventManager_onCharacterLevelUp; base.master.inventory.onInventoryChanged += Inventory_onInventoryChanged; LevelText.SetDisplayData += new Manipulator(LevelText_SetDisplayData); CharacterBody.RecalculateStats += new Manipulator(CharacterBody_RecalculateStats); } private void GlobalEventManager_onCharacterLevelUp(CharacterBody body) { if (remainingLevelReduction != 0 && (Object)(object)body.master == (Object)(object)base.master) { TryReduceLevel(); } } private void Inventory_onInventoryChanged() { CheckStackChange(); } private void LevelText_SetDisplayData(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, "StringBuilderExtensions", "AppendUint"), (Instruction x) => ILPatternMatchingExt.MatchPop(x) })) { val.MoveAfterLabels(); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Action)delegate(LevelText levelText) { //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0102: 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_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0124: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown //IL_0066: 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_0081: Unknown result type (might be due to invalid IL or missing references) bool num = Object.op_Implicit((Object)(object)levelText.source) && (Object)(object)levelText.source.master == (Object)(object)base.master && bonusLevelCount > 0; bool flag = adjustedLevelText.Contains(levelText); if (num) { if (!flag && Object.op_Implicit((Object)(object)levelText.targetText)) { RectTransform val2 = (RectTransform)((TMP_Text)levelText.targetText).transform; val2.sizeDelta = new Vector2(val2.sizeDelta.x + 15f, val2.sizeDelta.y); adjustedLevelText.Add(levelText); } LevelText.sharedStringBuilder.Append(" +"); StringBuilderExtensions.AppendInt(LevelText.sharedStringBuilder, bonusLevelCount, 1u, uint.MaxValue); LevelText.sharedStringBuilder.Append(""); } else if (flag && Object.op_Implicit((Object)(object)levelText.targetText)) { RectTransform val3 = (RectTransform)((TMP_Text)levelText.targetText).transform; Transform transform = ((Component)val3).transform; transform.position += Vector3.right * 1f; val3.sizeDelta = new Vector2(val3.sizeDelta.x - 15f, val3.sizeDelta.y); adjustedLevelText.Remove(levelText); } }); } else { SS2Log.Error(string.Concat(this, ": Level Text IL hook failed!"), 276, "LevelText_SetDisplayData"); } } private void CharacterBody_RecalculateStats(ILContext il) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int localLevelMultiplierLocIndex = -1; if (val.TryGotoNext((MoveType)2, new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCall(x, "get_level"), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1f), (Instruction x) => ILPatternMatchingExt.MatchSub(x) }) && val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref localLevelMultiplierLocIndex) })) { val.MoveAfterLabels(); val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldloc, localLevelMultiplierLocIndex); val.EmitDelegate>((Func)((CharacterBody body, float localLevelMultiplier) => ((Object)(object)body.master == (Object)(object)base.master) ? (localLevelMultiplier + (float)bonusLevelCount) : localLevelMultiplier)); val.Emit(OpCodes.Stloc, localLevelMultiplierLocIndex); } else { SS2Log.Error(string.Concat(this, ": Bonus Level Stats IL hook failed!"), 310, "CharacterBody_RecalculateStats"); } } private void OnDisable() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown CharacterBody.RecalculateStats -= new Manipulator(CharacterBody_RecalculateStats); LevelText.SetDisplayData -= new Manipulator(LevelText_SetDisplayData); base.master.inventory.onInventoryChanged -= Inventory_onInventoryChanged; GlobalEventManager.onCharacterLevelUp -= GlobalEventManager_onCharacterLevelUp; } } public class BabyToyToken : MonoBehaviour { public int pastStock; public int usesLeft; public CharacterBody PlayerOwner; public uint remainingLevelReduction; } private const string pickupToken = "SS2_ITEM_BABYTOYS_PICKUP"; private const string descToken = "SS2_ITEM_BABYTOYS_DESC"; [RooConfigurableField("SS2.Items", ConfigDesc = "Levels removed per stack.")] [TokenModifier(/*Could not decode attribute arguments.*/)] [TokenModifier(/*Could not decode attribute arguments.*/)] public static int levelReductionPerStack = 3; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("BabyToys", SS2Bundle.Items); public override void Initialize() { ((ContentBase)this).Initialize(); } } [DisabledContent] public sealed class BaneFlask : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IOnKilledOtherServerReceiver, IOnDamageDealtServerReceiver { [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.BaneFlask; } public void OnDamageDealtServer(DamageReport damageReport) { //IL_0015: 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_0065: 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) if (damageReport.victimBody.GetBuffCount(SS2Content.Buffs.BuffBane) < 1) { InflictDotInfo val = default(InflictDotInfo); val.attackerObject = ((Component)((BaseItemBodyBehavior)this).body).gameObject; val.victimObject = ((Component)damageReport.victimBody).gameObject; val.dotIndex = Bane.index; val.duration = debuffDuration; val.damageMultiplier = base.stack; InflictDotInfo val2 = val; DotController.InflictDot(ref val2); } } public void OnKilledOtherServer(DamageReport damageReport) { //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: 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_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_053b: Unknown result type (might be due to invalid IL or missing references) //IL_0540: Unknown result type (might be due to invalid IL or missing references) //IL_0547: Unknown result type (might be due to invalid IL or missing references) //IL_0551: Unknown result type (might be due to invalid IL or missing references) //IL_055e: Expected O, but got Unknown //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_0584: Unknown result type (might be due to invalid IL or missing references) //IL_058e: Unknown result type (might be due to invalid IL or missing references) //IL_059b: Expected O, but got Unknown //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_037f: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Expected O, but got Unknown //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_042c: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_044a: Unknown result type (might be due to invalid IL or missing references) //IL_0454: Unknown result type (might be due to invalid IL or missing references) //IL_0459: Unknown result type (might be due to invalid IL or missing references) //IL_045e: Unknown result type (might be due to invalid IL or missing references) //IL_0463: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Expected O, but got Unknown //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04b9: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04cc: Unknown result type (might be due to invalid IL or missing references) //IL_04d6: Unknown result type (might be due to invalid IL or missing references) //IL_04d7: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Unknown result type (might be due to invalid IL or missing references) //IL_04e3: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_04ed: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)damageReport.attacker) || !Object.op_Implicit((Object)(object)damageReport.attackerBody) || !Object.op_Implicit((Object)(object)damageReport.victim) || !Object.op_Implicit((Object)(object)damageReport.victimBody)) { return; } CharacterBody victimBody = damageReport.victimBody; CharacterBody attackerBody = damageReport.attackerBody; if (!Object.op_Implicit((Object)(object)attackerBody.inventory) || attackerBody.inventory.GetItemCount(SS2Content.Items.BaneFlask) <= 0) { return; } List timedBuffs = victimBody.timedBuffs; Dictionary dictionary = new Dictionary(); foreach (TimedBuff item in timedBuffs) { if (!dictionary.TryGetValue(item.buffIndex, out var value) && BuffCatalog.GetBuffDef(item.buffIndex).isDebuff) { dictionary.Add(item.buffIndex, item); } else if (BuffCatalog.GetBuffDef(item.buffIndex).isDebuff && value.timer < item.timer) { dictionary.Remove(item.buffIndex); dictionary.Add(item.buffIndex, item); } } DotController val = DotController.FindDotController(((Component)damageReport.victim).gameObject); Dictionary dictionary2 = new Dictionary(); if (Object.op_Implicit((Object)(object)val)) { foreach (DotStack dotStack in val.dotStackList) { if (!dictionary2.TryGetValue(dotStack.dotDef.associatedBuff.buffIndex, out var value2)) { dictionary2.Add(dotStack.dotDef.associatedBuff.buffIndex, dotStack); } else if (value2.timer < dotStack.timer) { dictionary2.Remove(dotStack.dotDef.associatedBuff.buffIndex); dictionary2.Add(dotStack.dotDef.associatedBuff.buffIndex, dotStack); } } } BuffIndex[] activeBuffsList = victimBody.activeBuffsList; List list = new List(); BuffIndex[] array = activeBuffsList; foreach (BuffIndex val2 in array) { if (victimBody.HasBuff(val2)) { BuffDef buffDef = BuffCatalog.GetBuffDef(val2); DotStack value3; bool flag = dictionary2.TryGetValue(val2, out value3); TimedBuff value4; bool flag2 = dictionary.TryGetValue(val2, out value4); if (buffDef.isDebuff && !flag && !flag2) { list.Add(val2); } } } float aoeRange = BaneFlask.aoeRange; float radius = victimBody.radius; float radius2 = aoeRange + radius; TeamIndex teamIndex = attackerBody.teamComponent.teamIndex; Vector3 corePosition = victimBody.corePosition; SphereSearch val3 = new SphereSearch(); List list2 = new List(); val3.origin = corePosition; val3.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; val3.radius = radius2; val3.RefreshCandidates(); val3.FilterCandidatesByHurtBoxTeam(TeamMask.GetUnprotectedTeams(teamIndex)); val3.FilterCandidatesByDistinctHurtBoxEntities(); val3.OrderCandidatesByDistance(); val3.GetHurtBoxes(list2); val3.ClearCandidates(); for (int j = 0; j < list2.Count; j++) { HurtBox val4 = list2[j]; if (!Object.op_Implicit((Object)(object)val4.healthComponent)) { continue; } foreach (KeyValuePair item2 in dictionary2) { InflictDotInfo val5 = default(InflictDotInfo); val5.attackerObject = ((Component)((BaseItemBodyBehavior)this).body).gameObject; val5.victimObject = ((Component)val4.healthComponent).gameObject; val5.dotIndex = item2.Value.dotIndex; val5.duration = item2.Value.timer; val5.damageMultiplier = item2.Value.damage; InflictDotInfo val6 = val5; DotController.InflictDot(ref val6); EffectData val7 = new EffectData { origin = victimBody.transform.position, color = Color32.op_Implicit(item2.Value.dotDef.associatedBuff.buffColor), scale = 1f }; EffectManager.SpawnEffect(particleBase, val7, true); } foreach (KeyValuePair item3 in dictionary) { val4.healthComponent.body.AddTimedBuffAuthority(item3.Key, item3.Value.timer); EffectData val8 = new EffectData { origin = victimBody.transform.position, color = Color32.op_Implicit(BuffCatalog.GetBuffDef(item3.Value.buffIndex).buffColor), scale = 1f }; EffectManager.SpawnEffect(particleBase, val8, true); } foreach (BuffIndex item4 in list) { val4.healthComponent.body.AddBuff(item4); EffectData val9 = new EffectData { origin = victimBody.transform.position, color = Color32.op_Implicit(BuffCatalog.GetBuffDef(item4).buffColor), scale = 1f }; EffectManager.SpawnEffect(particleBase, val9, true); } } list2.Clear(); EffectData val10 = new EffectData { origin = victimBody.transform.position, scale = 1f }; EffectManager.SpawnEffect(explosionGross, val10, true); if (victimBody.characterMotor.isGrounded) { EffectData val11 = new EffectData { origin = victimBody.transform.position, scale = 1f }; EffectManager.SpawnEffect(floorGloop, val11, true); } } } private const string token = "SS2_ITEM_BANEFLASK_DESC"; public static DotIndex DotIndex; [RooConfigurableField("SS2.Items", ConfigDesc = "Debuff Damage per Second. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float debuffDamage = 0.3f; [RooConfigurableField("SS2.Items", ConfigDesc = "Duration of applied Bane debuff. (1 = 1 second)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float debuffDuration = 5f; [RooConfigurableField("SS2.Items", ConfigDesc = "Range of on-death AOE. For reference, Gasoline's base range is 12m. (1 = 1m)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float aoeRange = 15f; public static GameObject explosionGross; public static GameObject particleBase; public static GameObject floorGloop; public static Dictionary buffColors = new Dictionary(); public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("BaneFlask", SS2Bundle.Items); public override void Initialize() { explosionGross = SS2Assets.LoadAsset("BaneGrayVFX", SS2Bundle.Items); particleBase = SS2Assets.LoadAsset("BaneHitsparkVFX", SS2Bundle.Items); floorGloop = SS2Assets.LoadAsset("BaneGrayGoop", SS2Bundle.Items); } } public sealed class DroidHead : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IOnKilledOtherServerReceiver { private GameObject masterPrefab = SS2Assets.LoadAsset("DroidDroneMaster", SS2Bundle.Items); [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.DroidHead; } public void OnKilledOtherServer(DamageReport damageReport) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0039: 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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) CharacterBody victimBody = damageReport.victimBody; if (!Object.op_Implicit((Object)(object)victimBody.inventory)) { return; } EquipmentIndex equipmentIndex = victimBody.inventory.GetEquipmentIndex(); if (victimBody.teamComponent.teamIndex != ((BaseItemBodyBehavior)this).body.teamComponent.teamIndex && victimBody.isElite && equipmentIndex != Equipment.EliteVoidEquipment.equipmentIndex) { CharacterMaster val = new MasterSummon { position = victimBody.corePosition + Vector3.up * 3f, masterPrefab = masterPrefab, summonerBodyObject = ((Component)((BaseItemBodyBehavior)this).body).gameObject }.Perform(); if (Object.op_Implicit((Object)(object)val)) { ((Component)val).gameObject.AddComponent().lifeTimer = baseLifeTime + stackLifeTime * (float)(base.stack - 1); CharacterBody body = val.GetBody(); body.baseDamage *= baseDamage * (float)base.stack; val.inventory.SetEquipmentIndex(equipmentIndex); Util.PlaySound("DroidHead", ((Component)((BaseItemBodyBehavior)this).body).gameObject); } } } } private const string token = "SS2_ITEM_DROIDHEAD_DESC"; [RooConfigurableField("SS2.Items", ConfigDesc = "Damage dealt by Security Drones, at base and per stack. Percentage (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float baseDamage = 1f; [RooConfigurableField("SS2.Items", ConfigDesc = "Base life time of the Security Drone, in seconds.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float baseLifeTime = 20f; [RooConfigurableField("SS2.Items", ConfigDesc = "Life time of the Security Drone per stack, in seconds.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float stackLifeTime = 10f; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("DroidHead", SS2Bundle.Items); } [DisabledContent] public sealed class ErraticGadget : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IBodyStatArgModifier, IOnIncomingDamageOtherServerReciever { private GameObject erraticGadgetPrefab; [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.ErraticGadget; } public void ModifyStatArguments(StatHookEventArgs args) { args.critAdd += 10f; } public void OnIncomingDamageOther(HealthComponent victimHealthComponent, DamageInfo damageInfo) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown if (damageInfo.crit) { if (Object.op_Implicit((Object)(object)erraticGadgetPrefab)) { EffectData val = new EffectData { origin = ((Component)victimHealthComponent).transform.position, start = ((BaseItemBodyBehavior)this).body.corePosition }; EffectManager.SpawnEffect(erraticGadgetPrefab, val, true); } damageInfo.damage += damageInfo.damage * 0.5f * (float)base.stack; } } } private const string token = "SS2_ITEM_ERRATICGADGET_DESC"; [RooConfigurableField("SS2.Items", ConfigDesc = "Base crit chance granted by the first stack of Erratic Gadget.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float extraCrit = 10f; [RooConfigurableField("SS2.Items", ConfigDesc = "Extra damage that crits deal per stack of Erratic Gadget. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float extraDamage = 0.5f; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("ErraticGadget", SS2Bundle.Items); } public sealed class GreenChocolate : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IOnIncomingDamageServerReceiver { [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.GreenChocolate; } public void Start() { if (Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)this).body.healthComponent)) { ref IOnIncomingDamageServerReceiver[] onIncomingDamageReceivers = ref ((BaseItemBodyBehavior)this).body.healthComponent.onIncomingDamageReceivers; IOnIncomingDamageServerReceiver val = (IOnIncomingDamageServerReceiver)(object)this; ArrayUtils.ArrayAppend(ref onIncomingDamageReceivers, ref val); } } public void OnIncomingDamageServer(DamageInfo damageInfo) { if (damageInfo.damage >= ((BaseItemBodyBehavior)this).body.healthComponent.fullCombinedHealth * damageThreshold) { damageInfo.damage = damageInfo.damage * (1f - damageReduction) + ((BaseItemBodyBehavior)this).body.healthComponent.fullCombinedHealth * (damageThreshold * damageReduction); ((BaseItemBodyBehavior)this).body.AddTimedBuff(SS2Content.Buffs.BuffChocolate, baseDuration + stackDuration * (float)(base.stack - 1)); } } private void OnDestroy() { if (Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)this).body.healthComponent)) { int num = Array.IndexOf(((BaseItemBodyBehavior)this).body.healthComponent.onIncomingDamageReceivers, (IOnIncomingDamageServerReceiver)(object)this); if (num > -1) { ArrayUtils.ArrayRemoveAtAndResize(ref ((BaseItemBodyBehavior)this).body.healthComponent.onIncomingDamageReceivers, ((BaseItemBodyBehavior)this).body.healthComponent.onIncomingDamageReceivers.Length, num); } } } } private const string token = "SS2_ITEM_GREENCHOCOLATE_DESC"; [RooConfigurableField("SS2.Items", ConfigDesc = "Percentage of max hp that must be lost for Green Chocolate's effect to proc. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float damageThreshold = 0.2f; [RooConfigurableField("SS2.Items", ConfigDesc = "Percent damage reduction that the damage in excess of the above threshold (base value 20%) is reduced by. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float damageReduction = 0.5f; [RooConfigurableField("SS2.Items", ConfigDesc = "Base duration of the buff provided by Green Chocolate. (1 = 1 second)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float baseDuration = 12f; [RooConfigurableField("SS2.Items", ConfigDesc = "Duration of the buff gained per stack. (1 = 1 second)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float stackDuration = 6f; [RooConfigurableField("SS2.Items", ConfigDesc = "Percent damage increase from the buff. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float buffDamage = 0.5f; [RooConfigurableField("SS2.Items", ConfigDesc = "Crit chance increase from the buff. (1 = 1% crit chance)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float buffCrit = 20f; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("GreenChocolate", SS2Bundle.Items); } public sealed class Insecticide : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IOnDamageDealtServerReceiver { [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.Insecticide; } public void OnDamageDealtServer(DamageReport report) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001b: 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) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: 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_00bd: Unknown result type (might be due to invalid IL or missing references) if (report.victimBody.teamComponent.teamIndex != report.attackerBody.teamComponent.teamIndex && report.damageInfo.procCoefficient > 0f && Util.CheckRoll(chance * 100f, report.attackerMaster)) { InflictDotInfo val = default(InflictDotInfo); val.attackerObject = ((Component)((BaseItemBodyBehavior)this).body).gameObject; val.victimObject = ((Component)report.victim).gameObject; val.dotIndex = Moonstorm.Starstorm2.Buffs.Insecticide.index; val.duration = report.damageInfo.procCoefficient * duration; val.damageMultiplier = (float)base.stack * (damageCoeff / 1.8f); InflictDotInfo val2 = val; DotController.InflictDot(ref val2); } } } public static DotIndex DotIndex; [RooConfigurableField("SS2.Items", ConfigDesc = "Chance. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float chance = 1f; [RooConfigurableField("SS2.Items", ConfigDesc = "Total damage. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float damageCoeff = 1.8f; [RooConfigurableField("SS2.Items", ConfigDesc = "Duration of poison.")] public static float duration = 3f; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("Insecticide", SS2Bundle.Items); public override void Initialize() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown DotController.onDotInflictedServerGlobal += new OnDotInflictedServerGlobalDelegate(RefreshInsects); } private void RefreshInsects(DotController dotController, ref InflictDotInfo inflictDotInfo) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) if (inflictDotInfo.dotIndex != DotIndex) { return; } int i = 0; for (int count = dotController.dotStackList.Count; i < count; i++) { if (dotController.dotStackList[i].dotIndex == DotIndex) { dotController.dotStackList[i].timer = Mathf.Max(dotController.dotStackList[i].timer, duration); } } } } public sealed class NkotasHeritage : ItemBase { public static class NkotasManager { public static void ActivateSingle(CharacterBody body) { //IL_0065: 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_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: 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_0117: Expected O, but got Unknown //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)body)) { return; } if (body.isPlayerControlled) { int amount = itemsPerStack * body.inventory.GetItemCount(SS2Content.Items.NkotasHeritage); SS2Util.DropShipCall(body.transform, 1, TeamManager.instance.GetTeamLevel(body.teamComponent.teamIndex), amount, (ItemTier)0, "NkotasIdleEffect"); Transform val = body.transform; ModelLocator modelLocator = body.modelLocator; int num = -1; ChildLocator val2; if ((Object)(object)modelLocator == (Object)null) { val2 = null; } else { Transform modelTransform = modelLocator.modelTransform; val2 = (((Object)(object)modelTransform != (Object)null) ? ((Component)modelTransform).GetComponent() : null); } if (Object.op_Implicit((Object)(object)val2)) { Transform val3 = val2.FindChild("Head"); num = val2.FindChildIndex("Head"); if (Object.op_Implicit((Object)(object)val3)) { val = val3; } } EffectData val4 = new EffectData { origin = val.position, scale = body.radius }; if (num != -1) { val4.SetChildLocatorTransformReference(((Component)body).gameObject, num); } EffectManager.SpawnEffect(SS2Assets.LoadAsset("NkotasSpawnEffect", SS2Bundle.Items), val4, true); } else { List inFlightOrbs = new List(); ItemDef val5; do { val5 = SS2Util.NkotasRiggedItemDrop(1, TeamManager.instance.GetTeamLevel(body.teamComponent.teamIndex)); } while (val5.ContainsTag((ItemTag)4) || val5.ContainsTag((ItemTag)13) || (Object)(object)val5 == (Object)(object)SS2Content.Items.NkotasHeritage || (BodyCatalog.FindBodyIndex("BrotherBody") == body.bodyIndex && val5.ContainsTag((ItemTag)11))); ItemTransferOrb item = ItemTransferOrb.DispatchItemTransferOrb(body.transform.position, body.inventory, val5.itemIndex, 1, (Action)delegate(ItemTransferOrb orb) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) body.inventory.GiveItem(orb.itemIndex, orb.stack); inFlightOrbs.Remove(orb); }, default(Either)); inFlightOrbs.Add(item); } } } public const string token = "SS2_ITEM_NKOTASHERITAGE_DESC"; [RooConfigurableField("SS2.Items", ConfigDesc = "Number of items given upon level up per stack.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static int itemsPerStack = 1; private static bool holdit = false; private static CharacterMaster[] characterMasters = (CharacterMaster[])(object)new CharacterMaster[0]; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("NkotasHeritage", SS2Bundle.Items); public override void Initialize() { GlobalEventManager.onCharacterLevelUp += GlobalEventManager_onCharacterLevelUp; SceneExitController.onBeginExit += SceneExitController_onBeginExit; Stage.onStageStartGlobal += Stage_onServerStageBegin; } private void Stage_onServerStageBegin(Stage obj) { if (!NetworkServer.active) { return; } holdit = false; for (int i = 0; i < characterMasters.Length; i++) { if (Object.op_Implicit((Object)(object)characterMasters[i])) { NkotasManager.ActivateSingle(characterMasters[i].GetBody()); } } int num = characterMasters.Length; ArrayUtils.Clear(characterMasters, ref num); } private void SceneExitController_onBeginExit(SceneExitController obj) { if (NetworkServer.active) { holdit = true; } } private void GlobalEventManager_onCharacterLevelUp(CharacterBody obj) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && Object.op_Implicit((Object)(object)obj.inventory) && obj.inventory.GetItemCount(SS2Content.Items.NkotasHeritage.itemIndex) >= 1) { if (holdit && obj.isPlayerControlled) { CharacterMaster master = obj.master; ArrayUtils.ArrayAppend(ref characterMasters, ref master); } else if (!Object.op_Implicit((Object)(object)((Component)obj).gameObject.GetComponent())) { NkotasManager.ActivateSingle(obj); } } } } public sealed class PortableReactor : ItemBase { private const string token = "SS2_ITEM_PORTABLEREACTOR_DESC"; [RooConfigurableField("SS2.Items", ConfigDesc = "Duration of invulnerability from Portable Reactor. (1 = 1 second)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float invulnTime = 80f; [RooConfigurableField("SS2.Items", ConfigDesc = "Stacking duration of invulnerability. (1 = 1 second)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float stackingInvuln = 40f; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("PortableReactor", SS2Bundle.Items); public override void Initialize() { CharacterBody.onBodyStartGlobal += ImFuckingInvincible; } private void ImFuckingInvincible(CharacterBody obj) { if (!Object.op_Implicit((Object)(object)obj.inventory)) { return; } int itemCount = obj.inventory.GetItemCount(((ItemBase)this).ItemDef); if (itemCount > 0) { if (obj.isPlayerControlled) { obj.AddTimedBuff(SS2Content.Buffs.BuffReactor, invulnTime + (float)(itemCount - 1) * stackingInvuln); } else { obj.AddTimedBuff(SS2Content.Buffs.BuffReactor, invulnTime / 4f + (float)(itemCount - 1) * stackingInvuln); } } } } public sealed class SwiftSkateboard : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IBodyStatArgModifier { private float cooldownTimer; public CharacterMaster CharMaster => ((Component)this).gameObject.GetComponent(); [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.SwiftSkateboard; } public void Start() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) if (omniSprint) { CharacterBody component = ((Component)this).GetComponent(); if (!((Enum)component.bodyFlags).HasFlag((Enum)(object)(BodyFlags)32)) { component.bodyFlags = (BodyFlags)(component.bodyFlags | 0x20); } else { ((Component)component).gameObject.AddComponent(); } } ((BaseItemBodyBehavior)this).body.onSkillActivatedAuthority += Kickflip; } private void Kickflip(GenericSkill skill) { //IL_0079: 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_00ae: Unknown result type (might be due to invalid IL or missing references) if (!((BaseItemBodyBehavior)this).body.HasBuff(SS2Content.Buffs.BuffKickflip)) { Util.PlaySound("SwiftSkateboard", ((Component)((BaseItemBodyBehavior)this).body).gameObject); } if (base.stack > 0 && cooldownTimer == 0f) { int buffCount = ((BaseItemBodyBehavior)this).body.GetBuffCount(SS2Content.Buffs.BuffKickflip); int num = maxStacks + maxStacksPerStack * (base.stack - 1); if (buffCount < num) { ((BaseItemBodyBehavior)this).body.AddTimedBuffAuthority(SS2Content.Buffs.BuffKickflip.buffIndex, buffDuration); } else if (buffCount == num) { ((BaseItemBodyBehavior)this).body.RemoveOldestTimedBuff(SS2Content.Buffs.BuffKickflip.buffIndex); ((BaseItemBodyBehavior)this).body.AddTimedBuffAuthority(SS2Content.Buffs.BuffKickflip.buffIndex, buffDuration); } cooldownTimer += buffCooldown; RefreshBuff(); } } private void RefreshBuff() { //IL_0015: 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) for (int i = 0; i < ((BaseItemBodyBehavior)this).body.timedBuffs.Count; i++) { if (((BaseItemBodyBehavior)this).body.timedBuffs[i].buffIndex == SS2Content.Buffs.BuffKickflip.buffIndex) { ((BaseItemBodyBehavior)this).body.timedBuffs[i].timer = buffDuration; } } } private void FixedUpdate() { if (cooldownTimer > 0f) { cooldownTimer = Mathf.Clamp(cooldownTimer - Time.fixedDeltaTime, 0f, buffCooldown); } } private void OnDestroy() { //IL_000f: 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_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) if (omniSprint) { CharacterBody component = ((Component)this).GetComponent(); if (((Enum)component.bodyFlags).HasFlag((Enum)(object)(BodyFlags)32) && !Object.op_Implicit((Object)(object)((Component)component).gameObject.GetComponent())) { component.bodyFlags = (BodyFlags)(component.bodyFlags & -33); } else { Object.Destroy((Object)(object)((Component)component).gameObject.GetComponent()); } } ((BaseItemBodyBehavior)this).body.onSkillActivatedAuthority -= Kickflip; } public void ModifyStatArguments(StatHookEventArgs args) { if (((BaseItemBodyBehavior)this).body.HasBuff(SS2Content.Buffs.BuffKickflip) && base.stack > 0) { args.moveSpeedMultAdd += (moveSpeedBonus + (float)(base.stack - 1) * moveSpeedBonusPerStack) * (float)((BaseItemBodyBehavior)this).body.GetBuffCount(SS2Content.Buffs.BuffKickflip); } } } public class SkateboardToken : MonoBehaviour { } public const string token = "SS2_ITEM_SKATEBOARD_DESC"; [RooConfigurableField("SS2.Items", ConfigDesc = "Movement speed bonus for each skateboard push. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float moveSpeedBonus = 0.2f; [RooConfigurableField("SS2.Items", ConfigDesc = "Movement speed bonus for each skateboard push for each item stack past the first. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float moveSpeedBonusPerStack = 0.15f; [RooConfigurableField("SS2.Items", ConfigDesc = "Initial maximum stacks for the Swift Skateboard's movement speed buff.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static int maxStacks = 4; [RooConfigurableField("SS2.Items", ConfigDesc = "Additional maximum stacks for each item stack of Swift Skateboard past the first.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static int maxStacksPerStack = 0; [RooConfigurableField("SS2.Items", ConfigDesc = "Duration of Swift Skateboard's movement speed buff.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float buffDuration = 3f; [RooConfigurableField("SS2.Items", ConfigDesc = "Cooldown between applications of Swift Skateboard's movement speed buff.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float buffCooldown = 0.75f; [RooConfigurableField("SS2.Items", ConfigDesc = "Whether Swift Skateboard should allow all-directional sprinting.")] public static bool omniSprint = true; public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("SwiftSkateboard", SS2Bundle.Items); } [DisabledContent] public sealed class NemCommandoLol : ItemBase { public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("NemCommandoLol", SS2Bundle.Nemmando); } [DisabledContent] public sealed class RelicOfDuality : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IOnIncomingDamageServerReceiver, IOnDamageDealtServerReceiver { [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.RelicOfDuality; } public void OnIncomingDamageServer(DamageInfo damageInfo) { ((Component)((BaseItemBodyBehavior)this).body).gameObject.GetComponent().SetFrozen((damageInfo.procCoefficient + 1f) * 6f); } private void Start() { if (Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)this).body.healthComponent)) { ref IOnIncomingDamageServerReceiver[] onIncomingDamageReceivers = ref ((BaseItemBodyBehavior)this).body.healthComponent.onIncomingDamageReceivers; IOnIncomingDamageServerReceiver val = (IOnIncomingDamageServerReceiver)(object)this; ArrayUtils.ArrayAppend(ref onIncomingDamageReceivers, ref val); } } public void OnDamageDealtServer(DamageReport report) { //IL_0014: 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_0072: 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 (report.damageInfo.procCoefficient > 0f) { InflictDotInfo val = default(InflictDotInfo); val.attackerObject = ((Component)((BaseItemBodyBehavior)this).body).gameObject; val.victimObject = ((Component)report.victim).gameObject; val.dotIndex = (DotIndex)1; val.duration = report.damageInfo.procCoefficient * 4f * (float)base.stack; val.damageMultiplier = 1f; InflictDotInfo val2 = val; DotController.InflictDot(ref val2); } } private void OnDestroy() { if (Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)this).body.healthComponent)) { int num = Array.IndexOf(((BaseItemBodyBehavior)this).body.healthComponent.onIncomingDamageReceivers, (IOnIncomingDamageServerReceiver)(object)this); if (num > -1) { ArrayUtils.ArrayRemoveAtAndResize(ref ((BaseItemBodyBehavior)this).body.healthComponent.onIncomingDamageReceivers, ((BaseItemBodyBehavior)this).body.healthComponent.onIncomingDamageReceivers.Length, num); } } } } public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("RelicOfDuality", SS2Bundle.Indev); } [DisabledContent] public sealed class RelicOfExtinction : ItemBase { public sealed class Behavior : BaseItemBodyBehavior { private GameObject prolapsedInstance; public bool shouldFollow = true; [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.RelicOfExtinction; } public void Start() { //IL_0028: 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) if (NetworkServer.active && !Object.op_Implicit((Object)(object)prolapsedInstance)) { prolapsedInstance = Object.Instantiate(SS2Assets.LoadAsset("ExtinctionHole", SS2Bundle.Indev), ((BaseItemBodyBehavior)this).body.corePosition, Quaternion.identity); prolapsedInstance.GetComponent().ownerObject = ((Component)((BaseItemBodyBehavior)this).body).gameObject; prolapsedInstance.GetComponent().AttachToGameObjectAndSpawn(((Component)((BaseItemBodyBehavior)this).body).gameObject, (string)null); } } } public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("RelicOfExtinction", SS2Bundle.Indev); } [DisabledContent] public sealed class ScavengersFortune : ItemBase { public sealed class Behavior : BaseItemBodyBehavior { public float goldThreshold = 20000f; public float goldAccum; public float updateMoney; [ItemDefAssociation] private static ItemDef GetItemDef() { return SS2Content.Items.ScavengersFortune; } public void FixedUpdate() { float num = ((BaseItemBodyBehavior)this).body.master.money; float num2 = num - updateMoney; if (num > updateMoney) { goldAccum += num2; } if (goldAccum >= goldThreshold) { ((BaseItemBodyBehavior)this).body.AddTimedBuff(SS2Content.Buffs.BuffWealth, 30f * (float)base.stack, 1); goldAccum -= goldThreshold; } updateMoney = num; } } public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("ScavengersFortune", SS2Bundle.Indev); } [DisabledContent] public sealed class StrangeCan : ItemBase { public sealed class Behavior : BaseItemBodyBehavior, IOnDamageDealtServerReceiver { [ItemDefAssociation(useOnClient = false)] private static ItemDef GetItemDef() { return SS2Content.Items.StrangeCan; } public void OnDamageDealtServer(DamageReport report) { //IL_0031: 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_003d: Invalid comparison between Unknown and I4 Util.PlaySound("StrangeCan", ((Component)report.victim).gameObject); report.victimBody.AddTimedBuff(Intoxicated.buff, 5f); if ((report.damageInfo.damageType & 0x1000) <= 0) { Util.CheckRoll(8.05f + (float)base.stack * report.damageInfo.procCoefficient, ((BaseItemBodyBehavior)this).body.master); } } } public override ItemDef ItemDef { get; } = SS2Assets.LoadAsset("StrangeCan", SS2Bundle.Items); } } namespace Moonstorm.Starstorm2.Equipments { public sealed class AffixEmpyrean : EliteEquipmentBase { public override EquipmentDef EquipmentDef { get; } = SS2Assets.LoadAsset("AffixEmpyrean", SS2Bundle.Equipments); public override List EliteDefs { get; } = new List { SS2Assets.LoadAsset("edEmpyrean", SS2Bundle.Equipments) }; public override bool FireAction(EquipmentSlot slot) { return false; } } [DisabledContent] public class AffixPurple : EliteEquipmentBase { public override List EliteDefs { get; } = new List { SS2Assets.LoadAsset("edPurple", SS2Bundle.Indev), SS2Assets.LoadAsset("edPurpleHonor", SS2Bundle.Indev) }; public override EquipmentDef EquipmentDef { get; } = SS2Assets.LoadAsset("ElitePurpleEquipment", SS2Bundle.Indev); public override bool FireAction(EquipmentSlot slot) { return false; } } public sealed class BackThruster : EquipmentBase { private const string token = "SS2_EQUIP_BACKTHRUSTER_DESC"; [RooConfigurableField("SS2.Items", ConfigDesc = "How long the Thruster buff lasts, in seconds.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float thrustDuration = 8f; [RooConfigurableField("SS2.Items", ConfigDesc = "Maximum speed bonus from Thruster (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float speedCap = 2f; [RooConfigurableField("SS2.Items", ConfigDesc = "How long it takes to reach maximum speed, in seconds")] public static float accel = 1.5f; [RooConfigurableField("SS2.Items", ConfigDesc = "Maximum turning angle before losing built up speed")] public static float maxAngle = 15f; public override EquipmentDef EquipmentDef { get; } = SS2Assets.LoadAsset("BackThruster", SS2Bundle.Equipments); public override bool FireAction(EquipmentSlot slot) { if (Object.op_Implicit((Object)(object)slot.characterBody.characterMotor)) { slot.characterBody.AddTimedBuff(SS2Content.Buffs.BuffBackThruster, thrustDuration); return true; } return false; } } public sealed class CloakingHeadband : EquipmentBase { [RooConfigurableField("SS2.Items", ConfigDesc = "How long the Cloak buff lasts, in seconds.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float cloakDuration = 8f; public override EquipmentDef EquipmentDef { get; } = SS2Assets.LoadAsset("CloakingHeadband", SS2Bundle.Equipments); public override bool FireAction(EquipmentSlot slot) { //IL_000b: 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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown slot.characterBody.AddTimedBuff(Buffs.Cloak.buffIndex, cloakDuration); slot.characterBody.AddTimedBuff(Buffs.CloakSpeed.buffIndex, cloakDuration); EffectData val = new EffectData { origin = slot.characterBody.transform.position }; val.SetNetworkedObjectReference(((Component)slot.characterBody).gameObject); EffectManager.SpawnEffect(StealthMode.smokeBombEffectPrefab, val, true); return true; } } public sealed class GreaterWarbanner : EquipmentBase { public sealed class GreaterWarbannerBehavior : ItemBehavior { public GameObject warBannerInstance; public float soundCooldown = 5f; private void FixedUpdate() { soundCooldown += Time.fixedDeltaTime; } private void OnDisable() { } } public class GreaterBannerToken : MonoBehaviour { public List ownedBanners = new List(0); public float soundCooldown = 5f; private void FixedUpdate() { soundCooldown += Time.fixedDeltaTime; } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static EffectCondition <>9__17_0; internal bool b__17_0(CharacterBody body) { return body.HasBuff(SS2Content.Buffs.BuffGreaterBanner); } } private const string token = "SS2_EQUIP_GREATERWARBANNER_DESC"; [RooConfigurableField("SS2.Items", ConfigDesc = "Amount of Extra Regeneration. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float extraRegeneration = 0.5f; [RooConfigurableField("SS2.Items", ConfigDesc = "Amount of Extra Crit Chance. (100 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float extraCrit = 20f; [RooConfigurableField("SS2.Items", ConfigDesc = "Amount of Cooldown Reduction. (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float cooldownReduction = 0.5f; [RooConfigurableField("SS2.Items", ConfigDesc = "Max active warbanners for each character.")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static int maxGreaterBanners = 5; public override EquipmentDef EquipmentDef { get; } = SS2Assets.LoadAsset("GreaterWarbanner", SS2Bundle.Equipments); public GameObject WarbannerObject { get; set; } = SS2Assets.LoadAsset("GreaterWarbannerWard", SS2Bundle.Equipments); public override void Initialize() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown CreateVisualEffects(); GenericSkill.RunRecharge += new hook_RunRecharge(FasterTickrateBannerHook); } private void FasterTickrateBannerHook(orig_RunRecharge orig, GenericSkill self, float dt) { if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.characterBody) && self.characterBody.HasBuff(SS2Content.Buffs.BuffGreaterBanner)) { dt *= 1f + 2f * cooldownReduction; } orig.Invoke(self, dt); } public override bool FireAction(EquipmentSlot slot) { //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) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Expected O, but got Unknown GreaterBannerToken component = ((Component)slot.characterBody).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { ((Component)slot.characterBody).gameObject.AddComponent(); component = ((Component)slot.characterBody).gameObject.GetComponent(); } Vector3 val = slot.inputBank.aimOrigin - slot.inputBank.aimDirection; GameObject val2 = Object.Instantiate(WarbannerObject, val, Quaternion.identity); val2.GetComponent().teamIndex = slot.teamComponent.teamIndex; NetworkServer.Spawn(val2); if (component.soundCooldown >= 5f) { EffectManager.SimpleSoundEffect(NetworkSoundEventCatalog.FindNetworkSoundEventIndex("GreaterWarbanner"), val2.transform.position, true); component.soundCooldown = 0f; } component.ownedBanners.Add(val2); if (component.ownedBanners.Count > maxGreaterBanners) { GameObject val3 = component.ownedBanners[0]; component.ownedBanners.RemoveAt(0); EffectData val4 = new EffectData { origin = val3.transform.position }; val4.SetNetworkedObjectReference(val3); EffectManager.SpawnEffect(AssetReferences.executeEffectPrefab, val4, true); Object.Destroy((Object)(object)val3); NetworkServer.Destroy(val3); } return true; } private void CreateVisualEffects() { //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_0036: Expected O, but got Unknown GameObject obj = PrefabAPI.InstantiateClone(SS2Assets.LoadAsset("GreaterBannerBuffEffect", SS2Bundle.Equipments), "GreaterBannerBuffEffect", false); object obj2 = <>c.<>9__17_0; if (obj2 == null) { EffectCondition val = (CharacterBody body) => body.HasBuff(SS2Content.Buffs.BuffGreaterBanner); <>c.<>9__17_0 = val; obj2 = (object)val; } TempVisualEffectAPI.AddTemporaryVisualEffect(obj, (EffectCondition)obj2, true, "MainHurtbox"); } } public sealed class MIDAS : EquipmentBase { public float goldEarned; [RooConfigurableField("SS2.Items", ConfigDesc = "Health percentage sacrificed (1 = 100%)")] [TokenModifier(/*Could not decode attribute arguments.*/)] public static float healthPercentage = 0.5f; [RooConfigurableField("SS2.Items")] public static float goldMultiplier = 1f; public override EquipmentDef EquipmentDef { get; } = SS2Assets.LoadAsset("MIDAS", SS2Bundle.Equipments); public override bool FireAction(EquipmentSlot slot) { //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_00ad: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: 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_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Invalid comparison between Unknown and I4 int num = 0; foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { _ = instance; num++; } float level = slot.characterBody.level; float num2 = 0.5f * (110f + 33f * (level - 1f)); float num3 = slot.characterBody.healthComponent.health * healthPercentage; float num4 = num3 / num2; goldEarned = Run.instance.GetDifficultyScaledCost((int)(25f * num4)); goldEarned = Mathf.Max(goldEarned, num3); DamageInfo val = new DamageInfo { damage = num3, damageType = (DamageType)2, damageColorIndex = (DamageColorIndex)3, inflictor = ((Component)slot.characterBody).gameObject, position = ((Component)slot.characterBody.healthComponent).gameObject.transform.position }; slot.characterBody.healthComponent.TakeDamage(val); if (!slot.characterBody.isPlayerControlled && (int)slot.characterBody.teamComponent.teamIndex == 1) { uint num5 = (uint)(goldEarned * goldMultiplier / (float)num); foreach (PlayerCharacterMasterController instance2 in PlayerCharacterMasterController.instances) { instance2.master.GiveMoney(num5); } } else { slot.characterBody.master.GiveMoney((uint)goldEarned); } return true; } } [DisabledContent] public sealed class PressurizedCanister : EquipmentBase { public sealed class Behavior : ItemBehavior { private static float duration = 0.8f; private static float thrustForce = 90f; private static int effectSpawnTotal = 10; private float stopwatch; private int effectInterval; private CharacterMotor characterMotor; private void Start() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) characterMotor = base.body.characterMotor; if (characterMotor.isGrounded) { EffectManager.SimpleEffect(Resources.Load("prefabs/effects/SmokescreenEffect"), base.body.footPosition, Quaternion.identity, true); } if (NetworkServer.active) { ((BaseCharacterController)characterMotor).Motor.ForceUnground(); EffectManager.SimpleEffect(SS2Assets.LoadAsset("canExhaust", SS2Bundle.Equipments), base.body.transform.position, base.body.transform.rotation, true); base.body.AddBuff(SS2Content.Buffs.bdCanJump.buffIndex); base.body.characterMotor.Jump(1.2f, 2.2f, false); } } private void FixedUpdate() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) stopwatch += Time.fixedDeltaTime; if (((NetworkBehaviour)base.body).hasAuthority) { AuthorityUpdate(); } if (stopwatch > duration || base.body.equipmentSlot.equipmentIndex != EquipmentCatalog.FindEquipmentIndex("PressurizedCanister")) { Object.Destroy((Object)(object)this); } } public void AuthorityUpdate() { } } public override EquipmentDef EquipmentDef { get; } = SS2Assets.LoadAsset("PressurizedCanister", SS2Bundle.Equipments); public override bool FireAction(EquipmentSlot slot) { if (Object.op_Implicit((Object)(object)slot.characterBody.characterMotor)) { slot.characterBody.AddItemBehavior(1); Debug.Log((object)"Adding behavior"); return true; } return false; } } public sealed class AffixVoid : EliteEquipmentBase { public override EquipmentDef EquipmentDef { get; } = SS2Assets.LoadAsset("AffixVoid", SS2Bundle.Indev); public override List EliteDefs => new List { SS2Assets.LoadAsset("Void", SS2Bundle.Indev) }; public override bool FireAction(EquipmentSlot slot) { return false; } } public sealed class DivineRight : EquipmentBase { public override EquipmentDef EquipmentDef { get; } = SS2Assets.LoadAsset("equipDivineRight", SS2Bundle.Indev); public override bool FireAction(EquipmentSlot slot) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) CharacterModel component = ((Component)slot.characterBody.modelLocator.modelTransform).GetComponent(); if ((Object)(object)component != (Object)null) { List equipmentDisplayObjects = component.GetEquipmentDisplayObjects(SS2Content.Equipments.equipDivineRight.equipmentIndex); if (equipmentDisplayObjects != null) { GameObject val = equipmentDisplayObjects[0]; if ((Object)(object)val != (Object)null) { GameObject followerInstance = val.GetComponent().followerInstance; if ((Object)(object)followerInstance != (Object)null) { ((Component)followerInstance.GetComponent().FindChild("Model")).gameObject.GetComponent().Play("Swing"); } } } } return true; } } [DisabledContent] public sealed class EliteKineticEquipment : EliteEquipmentBase { public override EquipmentDef EquipmentDef { get; } = SS2Assets.LoadAsset("EliteKineticEquipment", SS2Bundle.Indev); public override List EliteDefs => new List { SS2Assets.LoadAsset("edKinetic", SS2Bundle.Indev), SS2Assets.LoadAsset("edKineticHonor", SS2Bundle.Indev) }; public override bool FireAction(EquipmentSlot slot) { return false; } } [DisabledContent] public sealed class WhiteFlag : EquipmentBase { public sealed class GreaterWarbannerBehavior : ItemBehavior { public GameObject warBannerInstance; public float soundCooldown = 5f; private void FixedUpdate() { soundCooldown += Time.fixedDeltaTime; } private void OnDisable() { } } private const string token = "SS2_EQUIP_GREATERWARBANNER_DESC"; public override EquipmentDef EquipmentDef { get; } = SS2Assets.LoadAsset("WhiteFlag", SS2Bundle.Indev); public GameObject WarbannerObject { get; } = SS2Assets.LoadAsset("WhiteFlagWard", SS2Bundle.Indev); public override void AddBehavior(ref CharacterBody body, int stack) { body.AddItemBehavior(stack); } public override bool FireAction(EquipmentSlot slot) { //IL_001a: 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_002a: 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_0036: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) if (!slot.characterBody.characterMotor.isGrounded) { return false; } Vector3 val = slot.inputBank.aimOrigin + slot.inputBank.aimDirection; GameObject warBannerInstance = Object.Instantiate(WarbannerObject, val, Quaternion.identity); GreaterWarbannerBehavior component = ((Component)slot).gameObject.GetComponent(); component.warBannerInstance = warBannerInstance; NetworkServer.Spawn(component.warBannerInstance); if (component.soundCooldown >= 5f) { EffectManager.SimpleSoundEffect(NetworkSoundEventCatalog.FindNetworkSoundEventIndex("GreaterWarbanner"), component.warBannerInstance.transform.position, true); component.soundCooldown = 0f; } return true; } } } namespace Moonstorm.Starstorm2.Orbs { [RequireComponent(typeof(EffectComponent))] public class CharacterBodyOrbEffect : MonoBehaviour { public TrailRenderer trailToColor; public ParticleSystem[] particlesToColor; public SpriteRenderer[] spritesToColor; public RawImage image; private void Start() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005a: 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_0097: Unknown result type (might be due to invalid IL or missing references) CharacterBody component = BodyCatalog.GetBodyPrefab((BodyIndex)Util.UintToIntMinusOne(((Component)this).GetComponent().effectData.genericUInt)).GetComponent(); Color val = Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)8)); trailToColor.startColor *= val; trailToColor.endColor *= val; for (int i = 0; i < particlesToColor.Length; i++) { ParticleSystem obj = particlesToColor[i]; obj.startColor = val; obj.Play(); } for (int j = 0; j < spritesToColor.Length; j++) { spritesToColor[j].color = val; } image.texture = component.portraitIcon; } } public class ChirrSiphonOrb : Orb { public float siphonPercent; public float overrideDuration = 0.2f; public GameObject orbEffect; public CharacterBody siphonBody; public CharacterBody playerBody; public override void Begin() { //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_001c: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown //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_00ca: 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) ((Orb)this).duration = overrideDuration; EffectData val = new EffectData { scale = 1f, origin = siphonBody.corePosition, genericFloat = ((Orb)this).duration }; val.SetHurtBoxReference(playerBody.mainHurtBox); if (Object.op_Implicit((Object)(object)orbEffect)) { EffectManager.SpawnEffect(orbEffect, val, true); } if (Object.op_Implicit((Object)(object)siphonBody) && Object.op_Implicit((Object)(object)playerBody)) { HealthComponent healthComponent = siphonBody.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent)) { DamageInfo val2 = new DamageInfo(); val2.damage = healthComponent.fullHealth * siphonPercent; val2.position = siphonBody.corePosition; val2.procCoefficient = 0f; val2.damageType = (DamageType)2; val2.damageColorIndex = (DamageColorIndex)4; healthComponent.TakeDamage(val2); } } } public override void OnArrival() { //IL_002a: 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) if (Object.op_Implicit((Object)(object)playerBody)) { HealthComponent healthComponent = playerBody.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent)) { healthComponent.HealFraction(siphonPercent, default(ProcChainMask)); } } } } public class ExecutionerIonOrb : Orb { public ExecutionerController execController; private GameObject orbEffect = SS2Assets.LoadAsset("ExecutionerIonOrbEffect", SS2Bundle.Executioner); private GameObject orbEffectMastery = SS2Assets.LoadAsset("ExecutionerIonOrbEffectMastery", SS2Bundle.Executioner); private const float speed = 50f; private string skinNameToken; public override void Begin() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown ((Orb)this).duration = ((Orb)this).distanceToTarget / 50f; EffectData val = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration }; val.SetHurtBoxReference(base.target); EffectManager.SpawnEffect(orbEffect, val, true); HurtBox component = ((Component)base.target).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { execController = ((Component)component.healthComponent).GetComponent(); } } public override void OnArrival() { if (Object.op_Implicit((Object)(object)execController)) { execController.CallRpcAddIonCharge(); } } } public class ExecutionerIonSuperOrb : Orb { public float buffDuration = -1f; private NetworkSoundEventDef sound = SS2Assets.LoadAsset("SoundEventExecutionerGainCharge", SS2Bundle.Executioner); private GameObject orbEffect = SS2Assets.LoadAsset("ExecutionerIonSuperOrbEffect", SS2Bundle.Executioner); private HurtBox hurtBox; private const float speed = 50f; public override void Begin() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown ((Orb)this).duration = ((Orb)this).distanceToTarget / 50f; EffectData val = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration }; val.SetHurtBoxReference(base.target); EffectManager.SpawnEffect(orbEffect, val, true); hurtBox = ((Component)base.target).GetComponent(); } public override void OnArrival() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && Object.op_Implicit((Object)(object)hurtBox)) { CharacterBody body = hurtBox.healthComponent.body; if (buffDuration == -1f) { body.AddBuff(SS2Content.Buffs.BuffExecutionerSuperCharged); } else { body.AddTimedBuff(SS2Content.Buffs.BuffExecutionerSuperCharged, buffDuration); } EffectManager.SimpleSoundEffect(sound.index, body.corePosition, true); } } } public class NemmandoDashOrb : Orb { private const float speed = 80f; public override void Begin() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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_0023: Unknown result type (might be due to invalid IL or missing references) ((Orb)this).duration = ((Orb)this).distanceToTarget / 80f; new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration }.SetHurtBoxReference(base.target); } public override void OnArrival() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0007: 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) new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration }.SetHurtBoxReference(base.target); HurtBox component = ((Component)base.target).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } GameObject gameObject = ((Component)component.healthComponent).gameObject; if (Object.op_Implicit((Object)(object)gameObject)) { SetStateOnHurt component2 = gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.CallRpcSetStun(5f); } } } } } namespace Moonstorm.Starstorm2.ItemTiers { public class Sibylline : ItemTierBase { public override ItemTierDef ItemTierDef => SS2Assets.LoadAsset("Sibylline", SS2Bundle.Items); public override GameObject PickupDisplayVFX => SS2Assets.LoadAsset("SibyllinePickupDisplayVFX", SS2Bundle.Items); public override void Initialize() { //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) ((ContentBase)this).Initialize(); ((ItemTierBase)this).ItemTierDef.dropletDisplayPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/Common/VoidOrb.prefab").WaitForCompletion(); } } } namespace Moonstorm.Starstorm2.Interactables { public sealed class CloneDroneDamaged : InteractableBase { private GameObject interactable; private SummonMasterBehavior smb; private CharacterMaster cm; private GameObject bodyPrefab; private AkEvent[] droneAkEvents; public override GameObject Interactable { get; } = SS2Assets.LoadAsset("CloneDroneBroken", SS2Bundle.Interactables); public override MSInteractableDirectorCard InteractableDirectorCard { get; } = SS2Assets.LoadAsset("msidcCloneDrone", SS2Bundle.Interactables); public override void Initialize() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0065: 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) ((ContentBase)this).Initialize(); DeathState.OnImpactServer += new hook_OnImpactServer(spawnCloneCorpse); interactable = ((SpawnCard)((InteractableBase)this).InteractableDirectorCard).prefab; smb = interactable.GetComponent(); cm = smb.masterPrefab.GetComponent(); bodyPrefab = cm.bodyPrefab; GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Drones/Drone1Body.prefab").WaitForCompletion(); droneAkEvents = val.GetComponents(); AkEvent[] array = droneAkEvents; foreach (AkEvent val2 in array) { Type type = ((object)val2).GetType(); Component obj = bodyPrefab.AddComponent(type); FieldInfo[] fields = type.GetFields(); foreach (FieldInfo obj2 in fields) { object value = obj2.GetValue(val2); obj2.SetValue(obj, value); } } } private void spawnCloneCorpse(orig_OnImpactServer orig, DeathState self, Vector3 contactPoint) { //IL_0006: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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_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_0024: 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_002b: Expected O, but got Unknown //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Invalid comparison between Unknown and I4 if (((EntityState)self).characterBody.bodyIndex == BodyCatalog.FindBodyIndexCaseInsensitive("CloneDroneBody")) { DirectorPlacementRule val = new DirectorPlacementRule { placementMode = (PlacementMode)0, position = contactPoint }; GameObject val2 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest((SpawnCard)(object)((InteractableBase)this).InteractableDirectorCard, val, new Xoroshiro128Plus(0uL))); if (Object.op_Implicit((Object)(object)val2)) { PurchaseInteraction component = val2.GetComponent(); if (Object.op_Implicit((Object)(object)component) && (int)component.costType == 1) { component.Networkcost = Run.instance.GetDifficultyScaledCost(component.cost); } } } else { orig.Invoke(self, contactPoint); } } } public sealed class DroneTable : InteractableBase { private static class DroneCostTypeHelper { public static bool IsAffordable(CostTypeDef costTypeDef, IsAffordableContext context) { //IL_0000: 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_004e: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Invalid comparison between Unknown and I4 //IL_00d1: 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) CharacterBody component = ((Component)context.activator).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return false; } if (!Object.op_Implicit((Object)(object)component.inventory)) { return false; } int cost = context.cost; if (Object.op_Implicit((Object)(object)(((Object)(object)component != (Object)null) ? component.master : null))) { MinionGroup val = MinionGroup.FindGroup(((NetworkBehaviour)component.master).netId); if (val != null) { MinionOwnership[] members = val.members; List list = new List(); MinionOwnership[] array = members; foreach (MinionOwnership val2 in array) { if (!Object.op_Implicit((Object)(object)val2)) { continue; } CharacterMaster component2 = ((Component)val2).GetComponent(); if (!Object.op_Implicit((Object)(object)component2)) { continue; } CharacterBody body = component2.GetBody(); if (!Object.op_Implicit((Object)(object)body) || (body.bodyFlags & 2) <= 0) { continue; } foreach (KeyValuePair dronePair in dronePairs) { if (body.bodyIndex == BodyCatalog.FindBodyIndex(dronePair.Key)) { list.Add(component2); break; } } if (list.Count >= cost) { return true; } } } } return false; } public static void PayCost(CostTypeDef costTypeDef, PayCostContext context) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: 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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Invalid comparison between Unknown and I4 //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) CharacterBody component = ((Component)context.activator).GetComponent(); int cost = context.cost; MinionGroup val = MinionGroup.FindGroup(((NetworkBehaviour)component.master).netId); if (val == null) { return; } MinionOwnership[] members = val.members; List validMinions = new List(); MinionOwnership[] array = members; foreach (MinionOwnership val2 in array) { if (!Object.op_Implicit((Object)(object)val2)) { continue; } CharacterMaster component2 = ((Component)val2).GetComponent(); if (!Object.op_Implicit((Object)(object)component2)) { continue; } CharacterBody body = component2.GetBody(); if (!Object.op_Implicit((Object)(object)body) || (body.bodyFlags & 2) <= 0) { continue; } foreach (KeyValuePair dronePair in dronePairs) { if (body.bodyIndex == BodyCatalog.FindBodyIndex(dronePair.Key)) { validMinions.Add(component2); } } } Util.ShuffleList(validMinions, context.rng); for (int j = 0; j < cost; j++) { TakeOne(); } MultiShopCardUtils.OnNonMoneyPurchase(context); void TakeOne() { //IL_0043: 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_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected I4, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Invalid comparison between Unknown and I4 //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Invalid comparison between Unknown and I4 //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Invalid comparison between Unknown and I4 //IL_0193: 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_0286: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Expected I4, but got Unknown //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Expected I4, but got Unknown //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01df: 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_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) for (int k = 0; k < validMinions.Count(); k++) { if (Object.op_Implicit((Object)(object)validMinions[k])) { CharacterBody body2 = validMinions[k].GetBody(); for (int l = 0; l < dronePairs.Count; l++) { KeyValuePair keyValuePair = dronePairs[l]; if (body2.bodyIndex == BodyCatalog.FindBodyIndex(keyValuePair.Key)) { EffectData val3 = new EffectData { origin = body2.corePosition, genericFloat = 1.5f, genericUInt = (uint)(body2.bodyIndex + 1), genericBool = true }; GameObject purchasedObject = context.purchasedObject; val3.SetNetworkedObjectReference(context.purchasedObject); EffectManager.SpawnEffect(bodyOrb, val3, true); if (body2.baseNameToken == "TURRET1_BODY_NAME" || ((Object)body2).name == "Turret1Body(Clone)") { Util.PlaySound("Play_drone_deathpt1", ((Component)body2).gameObject); Util.PlaySound("Play_drone_deathpt2", ((Component)body2).gameObject); } if (!Object.op_Implicit((Object)(object)droneDropTable)) { droneDropTable = new DroneTableDropTable(); } int count = Mathf.RoundToInt(Mathf.Pow((float)keyValuePair.Value, 1.01f) * 0.15f - 4f); PickupIndex val4 = droneDropTable.GenerateDropPreReplacement(context.rng, count); if ((int)((PickupIndex)(ref val4)).pickupDef.itemTier != 0 && keyValuePair.Value < 60) { PickupIndex val5 = droneDropTable.GenerateDropPreReplacement(context.rng, count); if ((int)((PickupIndex)(ref val5)).pickupDef.itemTier != 2) { val4 = val5; } } if ((int)((PickupIndex)(ref val4)).pickupDef.itemTier == 2 && keyValuePair.Value >= 60 && keyValuePair.Value < 350) { PickupIndex val6 = droneDropTable.GenerateDropPreReplacement(context.rng, count); if ((int)((PickupIndex)(ref val6)).pickupDef.itemTier != 0) { val4 = val6; } } if ((int)((PickupIndex)(ref val4)).pickupDef.itemTier != 2 && keyValuePair.Value >= 350) { PickupIndex val7 = droneDropTable.GenerateDropPreReplacement(context.rng, count); if ((int)((PickupIndex)(ref val7)).pickupDef.itemTier != 0) { val4 = val7; PickupIndex val8 = droneDropTable.GenerateDropPreReplacement(context.rng, count); if ((int)((PickupIndex)(ref val8)).pickupDef.itemTier != 0) { val4 = val8; } } } Util.PlaySound("RefabricatorSelect2", purchasedObject); EntityStateMachine component3 = purchasedObject.GetComponent(); if (Object.op_Implicit((Object)(object)component3)) { component3.SetNextState((EntityState)(object)new DestroyLeadin { droneIndex = body2.bodyIndex + 1, itemIndex = (int)((PickupIndex)(ref val4)).pickupDef.itemIndex }); } ((Component)body2).gameObject.AddComponent(); body2.healthComponent.Suicide((GameObject)null, (GameObject)null, (DamageType)0); break; } } break; } } } } } public class RefabricatorInteractionToken : MonoBehaviour { public CharacterBody LastActivator; public PurchaseInteraction PurchaseInteraction; public void Start() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && Object.op_Implicit((Object)(object)Run.instance)) { PurchaseInteraction.SetAvailableTrue(); } PurchaseInteraction.costType = (CostTypeIndex)droneCostIndex; ((UnityEvent)(object)PurchaseInteraction.onPurchase).AddListener((UnityAction)DronePurchaseAttempt); } public void DronePurchaseAttempt(Interactor interactor) { if (Object.op_Implicit((Object)(object)interactor)) { CharacterBody component = ((Component)interactor).GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.master) && NetworkServer.active) { LastActivator = component; } } } } public class RefabricatorHardDeathToken : MonoBehaviour { } public class DroneTableDropTable : BasicPickupDropTable { private float tier1Weight = 0.793f; private float tier2Weight = 0.2f; private float tier3Weight = 0.007f; private readonly WeightedSelection selector = new WeightedSelection(8); private void AddNew(List sourceDropList, float listWeight) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) if (listWeight <= 0f || sourceDropList.Count == 0) { return; } float num = listWeight / (float)sourceDropList.Count; foreach (PickupIndex sourceDrop in sourceDropList) { selector.AddChoice(sourceDrop, num); } } public PickupIndex GenerateDropPreReplacement(Xoroshiro128Plus rng, int count) { //IL_0064: Unknown result type (might be due to invalid IL or missing references) selector.Clear(); AddNew(Run.instance.availableTier1DropList, tier1Weight); AddNew(Run.instance.availableTier2DropList, tier2Weight * (float)count); AddNew(Run.instance.availableTier3DropList, tier3Weight * Mathf.Pow((float)count, 2f)); return PickupDropTable.GenerateDropFromWeightedSelection(rng, selector); } public override int GetPickupCount() { return selector.Count; } public override PickupIndex[] GenerateUniqueDropsPreReplacement(int maxDrops, Xoroshiro128Plus rng) { return PickupDropTable.GenerateUniqueDropsFromWeightedSelection(maxDrops, rng, selector); } } public class RefabricatorTriple : MonoBehaviour { public Vector3 position; public Vector3 rotation; public Vector3 scale; public RefabricatorTriple(Vector3 pos, Vector3 rot, Vector3 size) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) position = pos; rotation = rot; scale = size; } } private static GameObject interactable; private static GameObject bodyOrb = SS2Assets.LoadAsset("CharacterBodyOrbEffect", SS2Bundle.Interactables); public static List> dronePairs = new List>(); public static Dictionary droneTripletPairs = new Dictionary(); public static Dictionary droneSpritePairs = new Dictionary(); public static CostTypeDef droneCostDef; public static int droneCostIndex; public static DroneTableDropTable droneDropTable; public override GameObject Interactable { get; } = SS2Assets.LoadAsset("DroneTablePrefab", SS2Bundle.Interactables); public override MSInteractableDirectorCard InteractableDirectorCard { get; } = SS2Assets.LoadAsset("midcDroneTable", SS2Bundle.Interactables); public override void Initialize() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown CostTypeCatalog.modHelper.getAdditionalEntries += addDroneCostType; DeathState.OnEnter += new hook_OnEnter(overrideDroneCorpse); interactable = ((SpawnCard)((InteractableBase)this).InteractableDirectorCard).prefab; interactable.AddComponent().PurchaseInteraction = interactable.GetComponent(); droneDropTable = ScriptableObject.CreateInstance(); SetupDroneValueList(); } private void overrideDroneCorpse(orig_OnEnter orig, DeathState self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((Component)((EntityState)self).characterBody).GetComponent())) { EntityState.Destroy((Object)(object)((EntityState)self).gameObject); } } private void overrideItemIcon(orig_Start orig, ItemTakenOrbEffect self) { //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: 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_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: 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_01c6: 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_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0117: 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_0139: 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_0157: Expected O, but got Unknown //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) EffectComponent component = ((Component)self).GetComponent(); bool genericBool = component.effectData.genericBool; uint genericUInt = component.effectData.genericUInt; if (genericBool) { KeyValuePair keyValuePair = dronePairs[(int)genericUInt]; CharacterBody component2 = BodyCatalog.FindBodyPrefab(keyValuePair.Key).GetComponent(); Sprite value = null; if (!droneSpritePairs.TryGetValue(keyValuePair.Key, out value)) { Texture portraitIcon = component2.portraitIcon; Rect val = default(Rect); ((Rect)(ref val))..ctor(0f, 0f, (float)portraitIcon.width, (float)portraitIcon.height); portraitIcon.filterMode = (FilterMode)0; RenderTexture temporary = RenderTexture.GetTemporary(portraitIcon.width, portraitIcon.height); ((Texture)temporary).filterMode = (FilterMode)0; RenderTexture.active = temporary; Graphics.Blit(portraitIcon, temporary); Texture2D val2 = new Texture2D((int)((Rect)(ref val)).width, (int)((Rect)(ref val)).height, (TextureFormat)4, false); val2.ReadPixels(new Rect(((Rect)(ref val)).x, (float)portraitIcon.height - ((Rect)(ref val)).height - ((Rect)(ref val)).y, ((Rect)(ref val)).width, ((Rect)(ref val)).height), 0, 0); val2.Apply(); RenderTexture.active = null; ((Texture)val2).wrapMode = (TextureWrapMode)1; ((Texture)val2).filterMode = (FilterMode)1; value = Sprite.Create(val2, new Rect(0f, 0f, 128f, 128f), new Vector2(0.5f, 0.5f), 25f); ((Object)value).name = ((Object)component2.portraitIcon).name + "Refabricator"; droneSpritePairs.Add(keyValuePair.Key, value); } self.iconSpriteRenderer.sprite = value; Color val3 = Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)1)); TrailRenderer trailToColor = self.trailToColor; trailToColor.startColor *= val3; TrailRenderer trailToColor2 = self.trailToColor; trailToColor2.endColor *= val3; for (int i = 0; i < self.particlesToColor.Length; i++) { ParticleSystem obj = self.particlesToColor[i]; MainModule main = obj.main; ((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(val3); obj.Play(); } for (int j = 0; j < self.spritesToColor.Length; j++) { self.spritesToColor[j].color = val3; } } else { orig.Invoke(self); } } private void SetupDroneValueList() { //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_014b: 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_0173: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: 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_0213: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Unknown result type (might be due to invalid IL or missing references) dronePairs.Add(new KeyValuePair("Turret1Body", 35)); dronePairs.Add(new KeyValuePair("Drone1Body", 40)); dronePairs.Add(new KeyValuePair("Drone2Body", 40)); dronePairs.Add(new KeyValuePair("MissileDroneBody", 60)); dronePairs.Add(new KeyValuePair("EquipmentDroneBody", 60)); dronePairs.Add(new KeyValuePair("EmergencyDroneBody", 100)); dronePairs.Add(new KeyValuePair("FlameDroneBody", 100)); dronePairs.Add(new KeyValuePair("MegaDroneBody", 350)); dronePairs.Add(new KeyValuePair("ShockDroneBody", 40)); dronePairs.Add(new KeyValuePair("CloneDroneBody", 140)); droneTripletPairs.Add("Turret1Body", new RefabricatorTriple(new Vector3(0f, -0.575f, -0.2f), new Vector3(0f, 180f, 0f), new Vector3(0.09f, 0.09f, 0.09f))); droneTripletPairs.Add("Drone1Body", new RefabricatorTriple(new Vector3(0f, -0.28f, 0f), new Vector3(0f, 156f, 0f), new Vector3(1.475f, 1.475f, 1.475f))); droneTripletPairs.Add("Drone2Body", new RefabricatorTriple(new Vector3(0f, -0.0125f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0.355f, 0.355f, 0.355f))); droneTripletPairs.Add("MissileDroneBody", new RefabricatorTriple(new Vector3(0.36f, 0f, 0f), new Vector3(0f, 0f, 90f), new Vector3(4f, 4f, 4f))); droneTripletPairs.Add("EquipmentDroneBody", new RefabricatorTriple(new Vector3(-0.185f, 0f, 0f), new Vector3(0f, 0f, 90f), new Vector3(0.505f, 0.505f, 0.505f))); droneTripletPairs.Add("EmergencyDroneBody", new RefabricatorTriple(new Vector3(0f, -0.225f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0.18f, 0.18f, 0.18f))); droneTripletPairs.Add("FlameDroneBody", new RefabricatorTriple(new Vector3(0.165f, -0.05f, 0f), new Vector3(0f, 0f, 90f), new Vector3(0.45f, 0.45f, 0.45f))); droneTripletPairs.Add("MegaDroneBody", new RefabricatorTriple(new Vector3(0f, -0.025f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0.1225f, 0.1225f, 0.1225f))); droneTripletPairs.Add("ShockDroneBody", new RefabricatorTriple(new Vector3(0.675f, 0.025f, 0f), new Vector3(0f, 0f, 90f), new Vector3(0.2f, 0.2f, 0.2f))); droneTripletPairs.Add("CloneDroneBody", new RefabricatorTriple(new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 90f), new Vector3(0.35f, 0.35f, 0.35f))); } private void addDroneCostType(List obj) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) droneCostDef = new CostTypeDef(); droneCostDef.costStringFormatToken = "SS2_COST_DRONE_FORMAT"; droneCostDef.isAffordable = new IsAffordableDelegate(DroneCostTypeHelper.IsAffordable); droneCostDef.payCost = new PayCostDelegate(DroneCostTypeHelper.PayCost); droneCostDef.colorIndex = (ColorIndex)6; droneCostDef.saturateWorldStyledCostString = true; droneCostDef.darkenWorldStyledCostString = false; droneCostIndex = CostTypeCatalog.costTypeDefs.Length + obj.Count; obj.Add(droneCostDef); } } [DisabledContent] public sealed class DropPod : InteractableBase { private static GameObject interactable; public override GameObject Interactable => interactable; public override MSInteractableDirectorCard InteractableDirectorCard { get; } = SS2Assets.LoadAsset("msidcDropPod", SS2Bundle.Indev); public override void Initialize() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) interactable = PrefabAPI.InstantiateClone(Resources.Load("prefabs/networkedobjects/SurvivorPod"), "DropPod", false); ((InteractableBase)this).Interactable.transform.position = Vector3.zero; DestroyUneededObjectsAndComponents(); EnableObjects(); ModifyExistingComponents(); AddNewComponents(); ref GameObject[] networkedObjectPrefabs = ref ((ContentLoader)ContentLoader.Instance).SerializableContentPack.networkedObjectPrefabs; GameObject val = ((InteractableBase)this).Interactable; ArrayUtils.ArrayAppend(ref networkedObjectPrefabs, ref val); ((SpawnCard)((InteractableBase)this).InteractableDirectorCard).prefab = ((InteractableBase)this).Interactable; ((InteractableSpawnCard)((InteractableBase)this).InteractableDirectorCard).maxSpawnsPerStage = 2; DirectorAPI.MonsterActions += HandleAvailableMonsters2; SS2Log.Info("Finished setting up Drop Pod."); } private void HandleAvailableMonsters2(DccsPool arg1, List arg2, StageInfo arg3) { DropPodController.currentStageMonsters = (from cardHolder in arg2 where (int)cardHolder.MonsterCategory == 2 select cardHolder.Card).ToArray(); } private void HandleAvailableMonsters(List arg1, StageInfo arg2) { DropPodController.currentStageMonsters = (from cardHolder in arg1 where (int)cardHolder.MonsterCategory == 2 select cardHolder.Card).ToArray(); } private void DestroyUneededObjectsAndComponents() { Object.Destroy((Object)(object)((InteractableBase)this).Interactable.GetComponent()); Object.Destroy((Object)(object)((InteractableBase)this).Interactable.GetComponent()); Object.Destroy((Object)(object)((InteractableBase)this).Interactable.GetComponent()); Object.Destroy((Object)(object)((Component)((InteractableBase)this).Interactable.transform.Find("Base/mdlEscapePod/EscapePodArmature/Base/Flames")).gameObject); Object.Destroy((Object)(object)((Component)((InteractableBase)this).Interactable.transform.Find("Base/mdlEscapePod/EscapePodArmature/Base/FireDonut")).gameObject); } private void EnableObjects() { ((Component)((InteractableBase)this).Interactable.transform.Find("Base/mdlEscapePod/EscapePodArmature/Base/DebrisParent")).gameObject.SetActive(true); } private void ModifyExistingComponents() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) EntityStateMachine component = ((InteractableBase)this).Interactable.GetComponent(); component.initialStateType = new SerializableEntityStateType(typeof(EntityStates.DropPod.Idle)); component.mainStateType = new SerializableEntityStateType(typeof(Idle)); ModelLocator component2 = ((InteractableBase)this).Interactable.GetComponent(); ((Behaviour)component2).enabled = true; component2.modelBaseTransform = null; Transform val = ((InteractableBase)this).Interactable.transform.Find("Base/mdlEscapePod/EscapePodArmature/ExitPosition"); ((Component)val).transform.localPosition = new Vector3(0f, -2f, 0f); ref NameTransformPair[] transformPairs = ref ((Component)component2.modelTransform).GetComponent().transformPairs; NameTransformPair val2 = new NameTransformPair { name = "ExitPos", transform = val }; ArrayUtils.ArrayAppend(ref transformPairs, ref val2); } private void AddNewComponents() { ((InteractableBase)this).Interactable.AddComponent().transformSyncMode = (TransformSyncMode)1; ((InteractableBase)this).Interactable.AddComponent().displayToken = "SS2_INTERACTABLE_DROPPOD_NAME"; ((InteractableBase)this).Interactable.AddComponent(); PaintDetailsBelow obj = ((InteractableBase)this).Interactable.AddComponent(); obj.influenceOuter = 2f; obj.influenceInner = 1f; obj.layer = 0; obj.density = 0.5f; obj.densityPower = 3f; PaintDetailsBelow obj2 = ((InteractableBase)this).Interactable.AddComponent(); obj2.influenceOuter = 2f; obj2.influenceInner = 1f; obj2.layer = 1; obj2.density = 0.3f; obj2.densityPower = 3f; ((Component)((InteractableBase)this).Interactable.transform.Find("Base/mdlEscapePod/EscapePodArmature/Base")).gameObject.AddComponent().entity = ((InteractableBase)this).Interactable; } } public sealed class ShockDroneDamaged : InteractableBase { private GameObject interactable; private SummonMasterBehavior smb; private CharacterMaster cm; private GameObject bodyPrefab; private AkEvent[] droneAkEvents; public override GameObject Interactable { get; } = SS2Assets.LoadAsset("ShockDroneBroken", SS2Bundle.Interactables); public override MSInteractableDirectorCard InteractableDirectorCard { get; } = SS2Assets.LoadAsset("msidcShockDrone", SS2Bundle.Interactables); public override void Initialize() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0065: 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) ((ContentBase)this).Initialize(); DeathState.OnImpactServer += new hook_OnImpactServer(spawnShockCorpse); interactable = ((SpawnCard)((InteractableBase)this).InteractableDirectorCard).prefab; smb = interactable.GetComponent(); cm = smb.masterPrefab.GetComponent(); bodyPrefab = cm.bodyPrefab; GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Drones/Drone1Body.prefab").WaitForCompletion(); droneAkEvents = val.GetComponents(); AkEvent[] array = droneAkEvents; foreach (AkEvent val2 in array) { Type type = ((object)val2).GetType(); Component obj = bodyPrefab.AddComponent(type); FieldInfo[] fields = type.GetFields(); foreach (FieldInfo obj2 in fields) { object value = obj2.GetValue(val2); obj2.SetValue(obj, value); } } } private void spawnShockCorpse(orig_OnImpactServer orig, DeathState self, Vector3 contactPoint) { //IL_0006: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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_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_0024: 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_002b: Expected O, but got Unknown //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Invalid comparison between Unknown and I4 if (((EntityState)self).characterBody.bodyIndex == BodyCatalog.FindBodyIndexCaseInsensitive("ShockDroneBody")) { DirectorPlacementRule val = new DirectorPlacementRule { placementMode = (PlacementMode)0, position = contactPoint }; GameObject val2 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest((SpawnCard)(object)((InteractableBase)this).InteractableDirectorCard, val, new Xoroshiro128Plus(0uL))); if (Object.op_Implicit((Object)(object)val2)) { PurchaseInteraction component = val2.GetComponent(); if (Object.op_Implicit((Object)(object)component) && (int)component.costType == 1) { component.Networkcost = Run.instance.GetDifficultyScaledCost(component.cost); } } } else { orig.Invoke(self, contactPoint); } } } } namespace Moonstorm.Starstorm2.DamageTypes { public sealed class ConfuseOnHit : DamageTypeBase { public static float duration = 4f; public static ModdedDamageType confuseDamageType; public override ModdedDamageType ModdedDamageType { get; protected set; } public override void Initialize() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) confuseDamageType = ((DamageTypeBase)this).ModdedDamageType; } public override void Delegates() { GlobalEventManager.onServerDamageDealt += ApplyConfusion; } private void ApplyConfusion(DamageReport report) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) CharacterBody victimBody = report.victimBody; if (DamageAPI.HasModdedDamageType(report.damageInfo, ((DamageTypeBase)this).ModdedDamageType)) { victimBody.AddTimedBuffAuthority(SS2Content.Buffs.BuffChirrConfuse.buffIndex, duration); } } } public sealed class ErraticGadget : DamageTypeBase { public static ModdedDamageType erraticDamageType; public override ModdedDamageType ModdedDamageType { get; protected set; } public override void Initialize() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) erraticDamageType = ((DamageTypeBase)this).ModdedDamageType; } public override void Delegates() { } } public sealed class GiveSecondaryOnKill : DamageTypeBase { public static ModdedDamageType giveSecondaryOnKill; public override ModdedDamageType ModdedDamageType { get; protected set; } public override void Initialize() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) giveSecondaryOnKill = ((DamageTypeBase)this).ModdedDamageType; } public override void Delegates() { } } public sealed class Gouge : DamageTypeBase { public static DotIndex DotIndex; public static float Duration = 2f; public static ModdedDamageType gougeDamageType; public override ModdedDamageType ModdedDamageType { get; protected set; } public override void Initialize() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //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) gougeDamageType = ((DamageTypeBase)this).ModdedDamageType; DotIndex = Moonstorm.Starstorm2.Buffs.Gouge.index; } public override void Delegates() { GlobalEventManager.onServerDamageDealt += ApplyGouge; } private void ApplyGouge(DamageReport report) { //IL_0015: 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_0045: 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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) CharacterBody victimBody = report.victimBody; CharacterBody attackerBody = report.attackerBody; if (DamageAPI.HasModdedDamageType(report.damageInfo, ((DamageTypeBase)this).ModdedDamageType)) { InflictDotInfo val = default(InflictDotInfo); val.attackerObject = ((Component)attackerBody).gameObject; val.victimObject = ((Component)victimBody).gameObject; val.dotIndex = Moonstorm.Starstorm2.Buffs.Gouge.index; val.duration = 2f; val.damageMultiplier = 1f; InflictDotInfo val2 = val; DotController.InflictDot(ref val2); } } } public sealed class NetOnHit : DamageTypeBase { public static float duration = 5f; public static ModdedDamageType netDamageType; public override ModdedDamageType ModdedDamageType { get; protected set; } public override void Initialize() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) netDamageType = ((DamageTypeBase)this).ModdedDamageType; } public override void Delegates() { GlobalEventManager.onServerDamageDealt += ApplyNet; } private void ApplyNet(DamageReport report) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) CharacterBody victimBody = report.victimBody; if (DamageAPI.HasModdedDamageType(report.damageInfo, ((DamageTypeBase)this).ModdedDamageType)) { victimBody.AddTimedBuffAuthority(SS2Content.Buffs.bdMULENet.buffIndex, duration); } } } public sealed class RedirectHologram : DamageTypeBase { public static ModdedDamageType damageType; public override ModdedDamageType ModdedDamageType { get; protected set; } public override void Initialize() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) damageType = ((DamageTypeBase)this).ModdedDamageType; } public override void Delegates() { } } public sealed class WeakPointProjectile : DamageTypeBase { public static ModdedDamageType weakPointProjectile; public static GameObject miniCritPrefab = SS2Assets.LoadAsset("CritsparkMini", SS2Bundle.Indev); public override ModdedDamageType ModdedDamageType { get; protected set; } public override void Initialize() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) weakPointProjectile = ((DamageTypeBase)this).ModdedDamageType; } public override void Delegates() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown ProjectileSingleTargetImpact.OnProjectileImpact += new hook_OnProjectileImpact(PSTI_OPI); } private void PSTI_OPI(orig_OnProjectileImpact orig, ProjectileSingleTargetImpact self, ProjectileImpactInfo impactInfo) { //IL_00cc: 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_0076: 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) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) if (((Object)((Component)self.projectileController).gameObject).name.Contains("NemHuntress")) { Collider collider = impactInfo.collider; if (Object.op_Implicit((Object)(object)collider)) { HurtBox component = ((Component)collider).GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.hurtBoxGroup) && component.isSniperTarget) { ProjectileDamage projectileDamage = self.projectileDamage; projectileDamage.damage *= 1.5f; self.projectileDamage.damageColorIndex = (DamageColorIndex)5; EffectManager.SimpleImpactEffect(miniCritPrefab, impactInfo.estimatedPointOfImpact, impactInfo.estimatedImpactNormal, true); self.hitSoundString = "NemHuntressHeadshot"; if ((Object)(object)((Component)self.projectileController).gameObject.GetComponent() != (Object)null) { ((Component)self.projectileController).gameObject.GetComponent().Detonate(); } } } } orig.Invoke(self, impactInfo); } } } namespace Moonstorm.Starstorm2.Monsters { [DisabledContent] public sealed class Agarthan : MonsterBase { public override GameObject BodyPrefab { get; } = SS2Assets.LoadAsset("AgarthanBody", SS2Bundle.Indev); public override GameObject MasterPrefab { get; } = SS2Assets.LoadAsset("AgarthanMaster", SS2Bundle.Indev); public override MSMonsterDirectorCard MonsterDirectorCard { get; } } public sealed class Lamp : MonsterBase { private MSMonsterDirectorCard defaultCard = SS2Assets.LoadAsset("msmdcLamp", SS2Bundle.Monsters); public override GameObject BodyPrefab { get; } = SS2Assets.LoadAsset("LampBody", SS2Bundle.Monsters); public override GameObject MasterPrefab { get; } = SS2Assets.LoadAsset("LampMaster", SS2Bundle.Monsters); public override void Initialize() { ((CharacterBase)this).Initialize(); ((MonsterBase)this).MonsterDirectorCards.Add(defaultCard); } } public sealed class LampBoss : MonsterBase { private MSMonsterDirectorCard defaultCard = SS2Assets.LoadAsset("msmdcLampBoss", SS2Bundle.Monsters); private MSMonsterDirectorCard chainedCard = SS2Assets.LoadAsset("msmdcLampBossChained", SS2Bundle.Monsters); private MSMonsterDirectorCard moonCard = SS2Assets.LoadAsset("msmdcLampBossMoon", SS2Bundle.Monsters); internal static GameObject wayfarerBuffWardPrefab; public override GameObject BodyPrefab { get; } = SS2Assets.LoadAsset("LampBossBody", SS2Bundle.Monsters); public override GameObject MasterPrefab { get; } = SS2Assets.LoadAsset("LampBossMaster", SS2Bundle.Monsters); public override void Initialize() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Invalid comparison between Unknown and I4 //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) ((CharacterBase)this).Initialize(); ((MonsterBase)this).MonsterDirectorCards.Add(chainedCard); if (!Object.op_Implicit((Object)(object)((CharacterBase)this).BodyPrefab.GetComponent()) && (int)SS2Assets.LoadAsset("ShackledLamp", SS2Bundle.Items).tier != 4) { DeathRewards component = ((CharacterBase)this).BodyPrefab.GetComponent(); ExplicitPickupDropTable val = ScriptableObject.CreateInstance(); val.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { new PickupDefEntry { pickupDef = (Object)(object)Items.Pearl, pickupWeight = 1f } }; component.bossDropTable = (PickupDropTable)(object)val; } double num = (DateTime.Now - new DateTime(2023, 12, 25)).TotalDays % 29.53; double num2 = 1.0; if (num < num2 || num > 29.53 - num2) { ((MonsterBase)this).MonsterDirectorCards.Add(moonCard); Debug.Log((object)("A brilliant light shines above. - " + num)); } else { ((MonsterBase)this).MonsterDirectorCards.Add(defaultCard); Debug.Log((object)("You stand alone in the dark. - " + num)); } } private void die(SceneDirector obj) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Invalid comparison between Unknown and I4 //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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_0078: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)((CharacterBase)this).BodyPrefab.GetComponent()) && (int)SS2Assets.LoadAsset("ShackledLamp", SS2Bundle.Items).tier != 4) { DeathRewards component = ((CharacterBase)this).BodyPrefab.GetComponent(); SS2Log.Info(component); ExplicitPickupDropTable val = (ExplicitPickupDropTable)component.bossDropTable; PickupDefEntry val2 = default(PickupDefEntry); val2.pickupDef = (Object)(object)Items.Pearl; val2.pickupWeight = 1f; val.pickupEntries[0] = val2; SerializablePickupIndex bossPickup = default(SerializablePickupIndex); bossPickup.pickupName = ((Object)Items.Pearl).name; component.bossPickup = bossPickup; } } public override void Hook() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown CharacterBody.AddBuff_BuffDef += new hook_AddBuff_BuffDef(CharacterBody_AddBuff_BuffDef); } private static void CharacterBody_AddBuff_BuffDef(orig_AddBuff_BuffDef orig, CharacterBody self, BuffDef buffDef) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) if (self.bodyIndex != BodyCatalog.FindBodyIndex("LampBossBody") || !((Object)(object)buffDef == (Object)(object)SS2Content.Buffs.bdLampBuff)) { orig.Invoke(self, buffDef); } } } [Serializable] public class MoonPhaseData { public PhaseData[] phasedata; } [Serializable] public class PhaseData { public string phase; } public class LampDropOverride : MonoBehaviour { } public sealed class Runshroom : MonsterBase { private MSMonsterDirectorCard defaultCard = SS2Assets.LoadAsset("msmdcRunshroom", SS2Bundle.Monsters); public override GameObject BodyPrefab { get; } = SS2Assets.LoadAsset("RunshroomBody", SS2Bundle.Monsters); public override GameObject MasterPrefab { get; } = SS2Assets.LoadAsset("RunshroomMaster", SS2Bundle.Monsters); public override void Initialize() { ((CharacterBase)this).Initialize(); ((MonsterBase)this).MonsterDirectorCards.Add(defaultCard); } public override void ModifyPrefab() { ((CharacterBase)this).ModifyPrefab(); DateTime today = DateTime.Today; if (today.Month == 12 && (today.Day == 27 || today.Day == 26 || today.Day == 25 || today.Day == 24 || today.Day == 23)) { ChristmasTime(); } } private void ChristmasTime() { ((CharacterBase)this).BodyPrefab.AddComponent(); ((CharacterBase)this).BodyPrefab.AddComponent().entity = ((CharacterBase)this).BodyPrefab; ((CharacterBase)this).BodyPrefab.AddComponent().targetRenderer = (Renderer)(object)((Component)((CharacterBase)this).BodyPrefab.GetComponent().modelTransform).GetComponent().mainSkinnedMeshRenderer; } } [DisabledContent] public sealed class Wayfarer : MonsterBase { internal static GameObject wayfarerBuffWardPrefab; public override GameObject BodyPrefab { get; } = SS2Assets.LoadAsset("WayfarerBody", SS2Bundle.Indev); public override GameObject MasterPrefab { get; } = SS2Assets.LoadAsset("WayfarerMaster", SS2Bundle.Indev); public override void Hook() { } private static void CharacterBody_AddBuff_BuffDef(orig_AddBuff_BuffDef orig, CharacterBody self, BuffDef buffDef) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) if (self.bodyIndex != BodyCatalog.FindBodyIndex("WayfarerBody") || !((Object)(object)buffDef == (Object)(object)Buffs.WarCryBuff)) { orig.Invoke(self, buffDef); } } private static void HookProjectileImpact_FixedUpdate(orig_FixedUpdate orig, HookProjectileImpact self) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Invalid comparison between Unknown and I4 //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: 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_0054: Unknown result type (might be due to invalid IL or missing references) if ((int)self.hookState == 2) { GameObject networkowner = self.projectileController.Networkowner; if (((networkowner == null) ? null : networkowner.GetComponent()?.bodyIndex) == (BodyIndex?)BodyCatalog.FindBodyIndex("WayfarerBody")) { Object.Destroy((Object)(object)self); return; } } orig.Invoke(self); } } } namespace Moonstorm.Starstorm2.Buffs { public sealed class AffixEmpyrean : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IOnKilledServerReceiver { private string ogSubtitle; private CharacterModel model; private GameObject rainbowEffect; private SetStateOnHurt setStateOnHurt; private bool wasStun; private bool wasHitStun; private bool wasFrozen; private string empyreanToken = "SS2_ELITE_EMPYREAN_SUBTITLE"; [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.bdEmpyrean; } private void Start() { EliteDef[] eliteDefs = EliteCatalog.eliteDefs; foreach (EliteDef val in eliteDefs) { if (val.IsAvailable() && !blacklistedEliteDefs.Contains(val) && !((BaseBuffBodyBehavior)this).body.HasBuff(val.eliteEquipmentDef.passiveBuffDef) && val.modifierToken != "LIT_MODIFIER_BLIGHTED") { ((BaseBuffBodyBehavior)this).body.AddBuff(val.eliteEquipmentDef.passiveBuffDef); } } setStateOnHurt = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)setStateOnHurt)) { wasStun = setStateOnHurt.canBeStunned; setStateOnHurt.canBeStunned = false; wasHitStun = setStateOnHurt.canBeHitStunned; setStateOnHurt.canBeHitStunned = false; wasFrozen = setStateOnHurt.canBeFrozen; setStateOnHurt.canBeFrozen = false; } ogSubtitle = ((BaseBuffBodyBehavior)this).body.subtitleNameToken; ((BaseBuffBodyBehavior)this).body.subtitleNameToken = empyreanToken; model = ((Component)((BaseBuffBodyBehavior)this).body.modelLocator.modelTransform).GetComponent(); if ((Object)(object)model != (Object)null) { rainbowEffect = Object.Instantiate(SS2Assets.LoadAsset("RainbowAffixEffect", SS2Bundle.Equipments), ((Component)model).transform); } } private void OnDestroy() { if (Object.op_Implicit((Object)(object)rainbowEffect)) { Object.Destroy((Object)(object)rainbowEffect); } if (Object.op_Implicit((Object)(object)setStateOnHurt)) { setStateOnHurt.canBeStunned = wasStun; setStateOnHurt.canBeHitStunned = wasHitStun; setStateOnHurt.canBeFrozen = wasFrozen; } EliteDef[] eliteDefs = EliteCatalog.eliteDefs; foreach (EliteDef val in eliteDefs) { if (((BaseBuffBodyBehavior)this).body.HasBuff(val.eliteEquipmentDef.passiveBuffDef)) { ((BaseBuffBodyBehavior)this).body.RemoveBuff(val.eliteEquipmentDef.passiveBuffDef); } } ((BaseBuffBodyBehavior)this).body.subtitleNameToken = ogSubtitle; } public void OnKilledServer(DamageReport damageReport) { //IL_0044: 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) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_008c: 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_0093: 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_00a1: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) int num = (((BaseBuffBodyBehavior)this).body.isChampion ? 4 : 2); float num2 = 360f / (float)num; float num3 = (0f - num2 / 2f) * (float)(num - 1); for (int i = 0; i < num; i++) { float num4 = num3 + (float)i * num2; Vector3 val = Quaternion.Euler(0f, num4, 0f) * damageReport.victimBody.coreTransform.forward; Vector3 val2 = Vector3.up * 20f + val * 10f; PickupIndex val3 = SacrificeArtifactManager.dropTable.GenerateDrop(SacrificeArtifactManager.treasureRng); if (val3 != PickupIndex.none) { PickupDropletController.CreatePickupDroplet(val3, damageReport.victimBody.corePosition, val2); } } if (Util.CheckRoll(20f, 0f, (CharacterMaster)null)) { EliteDef[] array = EliteCatalog.eliteDefs.Where((EliteDef x) => !blacklistedEliteDefs.Contains(x) && Object.op_Implicit((Object)(object)x.eliteEquipmentDef)).ToArray(); int num5 = Mathf.FloorToInt((float)Random.Range(0, array.Length)); PickupIndex val4 = PickupCatalog.FindPickupIndex(array[num5].eliteEquipmentDef.equipmentIndex); if (val4 != PickupIndex.none) { PickupDropletController.CreatePickupDroplet(val4, damageReport.victimBody.corePosition, Vector3.up * 20f); } } } } public static List blacklistedEliteDefs = new List(); public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("bdEmpyrean", SS2Bundle.Equipments); public override Material OverlayMaterial => SS2Assets.LoadAsset("matRainbowOverlay", SS2Bundle.Equipments); public static void AddEliteToBlacklist(EliteDef eliteDef) { blacklistedEliteDefs.Add(eliteDef); } public override void Initialize() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown ((ContentBase)this).Initialize(); Util.GetBestBodyName += new hook_GetBestBodyName(MakeEmpyreanName); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(CreateBlacklist)); CharacterBody.RecalculateStats += new Manipulator(RecalculateStatsEmpyreanIL); } private void RecalculateStatsEmpyreanIL(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILLabel val2 = default(ILLabel); if (val.TryGotoNext((MoveType)2, new Func[6] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "AffixBlue"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "HasBuff"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val2), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_maxHealth"), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.5f) })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((float defaultPercentage, CharacterBody body) => body.HasBuff(SS2Content.Buffs.bdEmpyrean) ? 0.1f : defaultPercentage)); } int num = default(int); if (val.TryGotoNext((MoveType)2, new Func[5] { (Instruction x) => ILPatternMatchingExt.MatchSub(x), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "set_maxHealth"), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_maxHealth") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((float defaultAmount, CharacterBody body) => body.HasBuff(SS2Content.Buffs.bdEmpyrean) ? (defaultAmount * 0.111f) : defaultAmount)); } } private static string MakeEmpyreanName(orig_GetBestBodyName orig, GameObject bodyObject) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) string text = orig.Invoke(bodyObject); BuffIndex buffIndex = SS2Content.Buffs.bdEmpyrean.buffIndex; if (!Object.op_Implicit((Object)(object)bodyObject)) { return text; } CharacterBody val = default(CharacterBody); if (!bodyObject.TryGetComponent(ref val)) { return text; } if (!val.HasBuff(buffIndex)) { return text; } BuffIndex[] eliteBuffIndices = BuffCatalog.eliteBuffIndices; foreach (BuffIndex val2 in eliteBuffIndices) { if (val2 != buffIndex) { string @string = Language.GetString(BuffCatalog.GetBuffDef(val2).eliteDef.modifierToken); @string = @string.Replace("{0}", string.Empty); text = text.Replace(@string, string.Empty); } } return text; } private static void CreateBlacklist() { AddEliteToBlacklist(Elites.Lunar); AddEliteToBlacklist(Elites.Void); } } [DisabledContent] public sealed class AffixKinetic : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior { public static GameObject pulsePrefab = SS2Assets.LoadAsset("VoidElitePulse", SS2Bundle.Indev); public static GameObject auraPrefab = SS2Assets.LoadAsset("KineticAOEIndicator", SS2Bundle.Indev); private GameObject tempAuraPrefab; private bool alreadyIn; private bool hasMadeAura; private float timer; private SphereSearch sphereSearch; [BuffDefAssociation] public static BuffDef GetBuffDef() { return SS2Content.Buffs.bdEliteKinetic; } private void FixedUpdate() { if (NetworkServer.active) { if (!((BaseBuffBodyBehavior)this).body.outOfCombat && timer > 4f) { PullEnemies(); timer = 0f; } timer += Time.fixedDeltaTime; } } private void OnEnable() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) SS2Log.Info("ahhh"); tempAuraPrefab = Object.Instantiate(auraPrefab, ((BaseBuffBodyBehavior)this).body.corePosition, Quaternion.identity); tempAuraPrefab.GetComponent().AttachToGameObjectAndSpawn(((Component)((BaseBuffBodyBehavior)this).body).gameObject, (string)null); } private void OnDisable() { SS2Log.Info("oooohohohohohohh"); if (Object.op_Implicit((Object)(object)tempAuraPrefab)) { SS2Log.Info("yay"); Object.Destroy((Object)(object)tempAuraPrefab); } } private void PullEnemies() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: 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_003b: 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_0047: 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) //IL_0051: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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) //IL_007a: 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_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_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_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) _ = ((BaseBuffBodyBehavior)this).body.radius; float radius = 20f; TeamIndex teamIndex = ((BaseBuffBodyBehavior)this).body.teamComponent.teamIndex; Vector3 corePosition = ((BaseBuffBodyBehavior)this).body.corePosition; SphereSearch val = new SphereSearch(); List list = new List(); val.origin = corePosition; val.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; val.radius = radius; val.RefreshCandidates(); val.FilterCandidatesByHurtBoxTeam(TeamMask.GetUnprotectedTeams(teamIndex)); val.FilterCandidatesByDistinctHurtBoxEntities(); val.OrderCandidatesByDistance(); val.GetHurtBoxes(list); val.ClearCandidates(); for (int i = 0; i < list.Count; i++) { HurtBox val2 = list[i]; if (!Object.op_Implicit((Object)(object)val2.healthComponent)) { continue; } CharacterBody body = val2.healthComponent.body; if (Object.op_Implicit((Object)(object)body)) { Vector3 position = ((BaseBuffBodyBehavior)this).body.transform.position; Vector3 position2 = body.transform.position; Vector3 val3 = position - position2; Vector3.Normalize(val3); EffectManager.SimpleImpactEffect(Addressables.LoadAssetAsync((object)"RoR2/DLC1/MoveSpeedOnKill/MoveSpeedOnKillActivate.prefab").WaitForCompletion(), position2, val3, true); float num = Random.Range(1.2f, 1.6f); Vector3 val4 = val3 * num; val4.y += 0.75f; CharacterMotor characterMotor = body.characterMotor; if (Object.op_Implicit((Object)(object)characterMotor)) { characterMotor.velocity += val4; ((BaseCharacterController)characterMotor).Motor.ForceUnground(); } } } list.Clear(); } private void GeneratePulse() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown GameObject obj = Object.Instantiate(pulsePrefab, ((BaseBuffBodyBehavior)this).body.transform.position, ((BaseBuffBodyBehavior)this).body.transform.rotation); PulseController component = obj.GetComponent(); sphereSearch = new SphereSearch { queryTriggerInteraction = (QueryTriggerInteraction)2, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, origin = ((BaseBuffBodyBehavior)this).body.transform.position }; component.finalRadius += (float)base.buffStacks; component.duration += (float)base.buffStacks * 0.1f; component.performSearch += new PerformSearchDelegate(PerformSearch); component.onPulseHit += new OnPulseHitDelegate(OnPulseHit); component.StartPulseServer(); NetworkServer.Spawn(obj); } private void PerformSearch(PulseController pulseController, Vector3 origin, float radius, List dest) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) sphereSearch.origin = origin; sphereSearch.radius = radius; if (sphereSearch.radius <= 0f) { return; } List list = CollectionPool>.RentCollection(); sphereSearch.RefreshCandidates().FilterCandidatesByDistinctHurtBoxEntities().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(((BaseBuffBodyBehavior)this).body.teamComponent.teamIndex)) .GetHurtBoxes(list); for (int i = 0; i < list.Count; i++) { if (Object.op_Implicit((Object)(object)list[i].healthComponent)) { PulseSearchResult item = default(PulseSearchResult); item.hitObject = (Object)(object)list[i].healthComponent; item.hitPos = list[i].healthComponent.body.transform.position; dest.Add(item); } } CollectionPool>.ReturnCollection(list); } private void OnPulseHit(PulseController pulseController, PulseHit hitInfo) { //IL_0000: 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_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0034: 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) if (Object.op_Implicit(hitInfo.hitObject)) { HealthComponent val = (HealthComponent)hitInfo.hitObject; if (TeamManager.IsTeamEnemy(val.body.teamComponent.teamIndex, ((BaseBuffBodyBehavior)this).body.teamComponent.teamIndex)) { val.body.AddTimedBuff(SS2Content.Buffs.BuffVoidLeech, (float)(4 + base.buffStacks) * hitInfo.hitSeverity); } } } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("bdEliteKinetic", SS2Bundle.Indev); } public sealed class AffixPurple : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IOnDamageDealtServerReceiver { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.bdElitePurple; } public void OnDamageDealtServer(DamageReport damageReport) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) HealthComponent victim = damageReport.victim; GameObject attacker = damageReport.attacker; if ((Object)(object)((Component)victim).gameObject != (Object)(object)attacker && damageReport.damageInfo.procCoefficient > 0f) { victim.body.AddTimedBuffAuthority(SS2Content.Buffs.bdPurplePoison.buffIndex, 6f); } } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("bdElitePurple", SS2Bundle.Indev); } [DisabledContent] public sealed class AffixVoid : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior { public static GameObject pulsePrefab = SS2Assets.LoadAsset("VoidElitePulse", SS2Bundle.Indev); private bool alreadyIn; private SphereSearch sphereSearch; [BuffDefAssociation] public static BuffDef GetBuffDef() { return SS2Content.Buffs.BuffAffixVoid; } private void FixedUpdate() { if (NetworkServer.active) { if (!((BaseBuffBodyBehavior)this).body.outOfCombat && !alreadyIn) { GeneratePulse(); alreadyIn = true; } else if (((BaseBuffBodyBehavior)this).body.outOfCombat && alreadyIn) { alreadyIn = false; } } } private void GeneratePulse() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown GameObject obj = Object.Instantiate(pulsePrefab, ((BaseBuffBodyBehavior)this).body.transform.position, ((BaseBuffBodyBehavior)this).body.transform.rotation); PulseController component = obj.GetComponent(); sphereSearch = new SphereSearch { queryTriggerInteraction = (QueryTriggerInteraction)2, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, origin = ((BaseBuffBodyBehavior)this).body.transform.position }; component.finalRadius += (float)base.buffStacks; component.duration += (float)base.buffStacks * 0.1f; component.performSearch += new PerformSearchDelegate(PerformSearch); component.onPulseHit += new OnPulseHitDelegate(OnPulseHit); component.StartPulseServer(); NetworkServer.Spawn(obj); } private void PerformSearch(PulseController pulseController, Vector3 origin, float radius, List dest) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) sphereSearch.origin = origin; sphereSearch.radius = radius; if (sphereSearch.radius <= 0f) { return; } List list = CollectionPool>.RentCollection(); sphereSearch.RefreshCandidates().FilterCandidatesByDistinctHurtBoxEntities().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(((BaseBuffBodyBehavior)this).body.teamComponent.teamIndex)) .GetHurtBoxes(list); for (int i = 0; i < list.Count; i++) { if (Object.op_Implicit((Object)(object)list[i].healthComponent)) { PulseSearchResult item = default(PulseSearchResult); item.hitObject = (Object)(object)list[i].healthComponent; item.hitPos = list[i].healthComponent.body.transform.position; dest.Add(item); } } CollectionPool>.ReturnCollection(list); } private void OnPulseHit(PulseController pulseController, PulseHit hitInfo) { //IL_0000: 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_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0034: 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) if (Object.op_Implicit(hitInfo.hitObject)) { HealthComponent val = (HealthComponent)hitInfo.hitObject; if (TeamManager.IsTeamEnemy(val.body.teamComponent.teamIndex, ((BaseBuffBodyBehavior)this).body.teamComponent.teamIndex)) { val.body.AddTimedBuff(SS2Content.Buffs.BuffVoidLeech, (float)(4 + base.buffStacks) * hitInfo.hitSeverity); } } } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffAffixVoid", SS2Bundle.Indev); } public sealed class BackThrust : BuffBase { public sealed class BackThrustBehavior : BaseBuffBodyBehavior, IBodyStatArgModifier { private float stopwatch; private float thrust; private float watchInterval = 0.15f; private float moveAngle; private float lastAngle; private float accelCoeff = BackThruster.speedCap / (BackThruster.accel + 1E-05f); private float cutoff = BackThruster.maxAngle * (MathF.PI / 180f); [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.BuffBackThruster; } private void FixedUpdate() { stopwatch += Time.fixedDeltaTime; if (stopwatch > watchInterval) { stopwatch -= watchInterval; moveAngle = Mathf.Atan2(((BaseBuffBodyBehavior)this).body.characterMotor.velocity.x, ((BaseBuffBodyBehavior)this).body.characterMotor.velocity.z) + MathF.PI; if (((BaseBuffBodyBehavior)this).body.notMovingStopwatch < 0.1f && CheckAngle()) { thrust = Mathf.Min(thrust + accelCoeff * watchInterval, BackThruster.speedCap); } else { thrust = Mathf.Max(thrust - accelCoeff * watchInterval * 3f, 0f); } ((BaseBuffBodyBehavior)this).body.RecalculateStats(); lastAngle = moveAngle; } } public void ModifyStatArguments(StatHookEventArgs args) { args.moveSpeedMultAdd += thrust; } public void OnDestroy() { thrust = 0f; lastAngle = 0f; ((BaseBuffBodyBehavior)this).body.RecalculateStats(); } private bool CheckAngle() { float num = Mathf.Abs(moveAngle - lastAngle); if (num <= cutoff || num > MathF.PI * 2f - cutoff) { return true; } return false; } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffBackThruster", SS2Bundle.Equipments); public override void Initialize() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((BuffBase)this).BuffDef.buffColor = Color.yellow; } } public sealed class Bane : BuffBase { public static DotIndex index; public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffBane", SS2Bundle.Items); public override void Initialize() { //IL_0013: 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) index = DotAPI.RegisterDotDef(1f, 0.15f, (DamageColorIndex)4, ((BuffBase)this).BuffDef, (CustomDotBehaviour)null, (CustomDotVisual)null); } } public sealed class BloonTrap : BuffBase, IBodyStatArgModifier { private static float slowAmount = 0.5f; public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffBloonTrap", SS2Bundle.Indev); public override void Initialize() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown ((ContentBase)this).Initialize(); HealthComponent.GetHealthBarValues += new hook_GetHealthBarValues(AddSuck); } public void ModifyStatArguments(StatHookEventArgs args) { args.moveSpeedMultAdd -= slowAmount; } private HealthBarValues AddSuck(orig_GetHealthBarValues orig, HealthComponent self) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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_003a: Unknown result type (might be due to invalid IL or missing references) HealthBarValues val = orig.Invoke(self); if (!((Enum)self.body.bodyFlags).HasFlag((Enum)(object)(BodyFlags)16) && self.body.HasBuff(SS2Content.Buffs.BuffBloonTrap)) { val.cullFraction = Mathf.Max(val.cullFraction, 0.2f); } return val; } } public sealed class BuffCyborgPrimary : BuffBase { public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffCyborgPrimary", SS2Bundle.Indev); } public sealed class CanJump : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.bdCanJump; } public void Start() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown CharacterBody body = ((BaseBuffBodyBehavior)this).body; body.baseJumpCount++; ((BaseBuffBodyBehavior)this).body.characterMotor.onHitGroundAuthority += new HitGroundDelegate(RemoveBuff); } public void FixedUpdate() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) if (((ButtonState)(ref ((BaseBuffBodyBehavior)this).body.inputBank.jump)).justPressed) { EffectManager.SimpleEffect(SS2Assets.LoadAsset("canExhaust", SS2Bundle.Equipments), ((BaseBuffBodyBehavior)this).body.transform.position, ((BaseBuffBodyBehavior)this).body.transform.rotation, false); ((BaseBuffBodyBehavior)this).body.RemoveBuff(SS2Content.Buffs.bdCanJump.buffIndex); } } private void RemoveBuff(ref HitGroundInfo hitGroundInfo) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((BaseBuffBodyBehavior)this).body.RemoveBuff(SS2Content.Buffs.bdCanJump.buffIndex); } public void OnDestroy() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown ((BaseBuffBodyBehavior)this).body.characterMotor.onHitGroundAuthority -= new HitGroundDelegate(RemoveBuff); CharacterBody body = ((BaseBuffBodyBehavior)this).body; body.baseJumpCount--; } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("bdCanJump", SS2Bundle.Equipments); } public sealed class ChirrConfuse : BuffBase { public static float slowAmount = 0.5f; public static float attackSpeedSlowAmount = 0f; public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffChirrConfuse", SS2Bundle.Chirr); public override void Initialize() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown ((ContentBase)this).Initialize(); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(ModifyStats); } private void ModifyStats(CharacterBody sender, StatHookEventArgs args) { int buffCount = sender.GetBuffCount(((BuffBase)this).BuffDef); args.moveSpeedMultAdd -= slowAmount * (float)buffCount; args.attackSpeedMultAdd -= attackSpeedSlowAmount * (float)buffCount; } } public sealed class ChirrConvert : BuffBase, IBodyStatArgModifier { public static DotIndex dotIndex; public static float damageCoefficient = 0.8f; public static float slowAmount = 0.8f; public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffChirrConvert", SS2Bundle.Chirr); public override void Initialize() { //IL_0013: 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) dotIndex = DotAPI.RegisterDotDef(0.33f, damageCoefficient, (DamageColorIndex)4, ((BuffBase)this).BuffDef, (CustomDotBehaviour)null, (CustomDotVisual)null); } public void ModifyStatArguments(StatHookEventArgs args) { args.moveSpeedMultAdd -= slowAmount; } } public sealed class ChirrFriend : BuffBase { public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffChirrFriend", SS2Bundle.Chirr); public override Material OverlayMaterial => SS2Assets.LoadAsset("matFriendOverlay", SS2Bundle.Chirr); } public sealed class ChirrGrabFriend : BuffBase { public static float attackSpeedBuff = 1f; public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffChirrGrabFriend", SS2Bundle.Chirr); public override void Initialize() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown ((ContentBase)this).Initialize(); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(ModifyStats); } private void ModifyStats(CharacterBody sender, StatHookEventArgs args) { int buffCount = sender.GetBuffCount(((BuffBase)this).BuffDef); args.baseAttackSpeedAdd += attackSpeedBuff * (float)buffCount; } } public sealed class ChirrRegen : BuffBase { public static float percentHealthRegen = 0.05f; public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffChirrRegen", SS2Bundle.Chirr); public override void Initialize() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown ((ContentBase)this).Initialize(); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(((BuffBase)this).BuffDef)) { args.baseRegenAdd += sender.maxHealth * percentHealthRegen; } } } public sealed class Chocolate : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IBodyStatArgModifier { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.BuffChocolate; } public void ModifyStatArguments(StatHookEventArgs args) { args.critAdd += GreenChocolate.buffCrit * (float)base.buffStacks; args.damageMultAdd += GreenChocolate.buffDamage * (float)base.buffStacks; } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffChocolate", SS2Bundle.Items); } public sealed class CoffeeBag : BuffBase { public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffCoffeeBag", SS2Bundle.Items); } public sealed class CyborgTeleporter : BuffBase { public sealed class CyborgTeleBuffBehavior : BaseBuffBodyBehavior { [BuffDefAssociation(useOnClient = false, useOnServer = true)] private static BuffDef GetBuffDef() { return SS2Content.Buffs.BuffCyborgTeleporter; } private void FixedUpdate() { float fullHealth = ((BaseBuffBodyBehavior)this).body.healthComponent.fullHealth; ((BaseBuffBodyBehavior)this).body.healthComponent.AddBarrier(fullHealth * percentHealthShieldPerSecond * Time.fixedDeltaTime); } } public static float cooldownReduction = 0.5f; public static float percentHealthShieldPerSecond = 0.075f; public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffCyborgTeleporter", SS2Bundle.Indev); public override void Initialize() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown ((ContentBase)this).Initialize(); GenericSkill.RunRecharge += new hook_RunRecharge(AddRecharge); } private void AddRecharge(orig_RunRecharge orig, GenericSkill self, float dt) { if (self.characterBody.HasBuff(SS2Content.Buffs.BuffCyborgTeleporter)) { dt *= 1f / (1f - cooldownReduction); } orig.Invoke(self, dt); } } public sealed class DroneBuff : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IBodyStatArgModifier { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.bdOverstress; } public void ModifyStatArguments(StatHookEventArgs args) { args.armorAdd += 30f; args.baseAttackSpeedAdd += 0.2f; } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("bdNemCapDroneBuff", SS2Bundle.Indev); } public sealed class BuffEchelon : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IBodyStatArgModifier { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.BuffEchelon; } public void ModifyStatArguments(StatHookEventArgs args) { args.baseDamageAdd += RelicOfEchelon.damageBonus; args.baseHealthAdd += RelicOfEchelon.healthBonus; } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffEchelon", SS2Bundle.Indev); } public sealed class ExeCharge : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior { private float timer; [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.bdExeCharge; } public void FixedUpdate() { //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active || ((BaseBuffBodyBehavior)this).body.baseNameToken != "SS2_EXECUTIONER2_NAME" || ((BaseBuffBodyBehavior)this).body.HasBuff(SS2Content.Buffs.bdExeMuteCharge)) { return; } timer += Time.fixedDeltaTime; if (timer >= 1.2f && ((BaseBuffBodyBehavior)this).body.skillLocator.secondary.stock < ((BaseBuffBodyBehavior)this).body.skillLocator.secondary.maxStock) { timer = 0f; ((BaseBuffBodyBehavior)this).body.skillLocator.secondary.AddOneStock(); if (((BaseBuffBodyBehavior)this).body.skillLocator.secondary.stock < ((BaseBuffBodyBehavior)this).body.skillLocator.secondary.maxStock) { Util.PlaySound("ExecutionerGainCharge", ((Component)this).gameObject); EffectManager.SimpleMuzzleFlash(plumeEffect, ((Component)this).gameObject, "ExhaustL", true); EffectManager.SimpleMuzzleFlash(plumeEffect, ((Component)this).gameObject, "ExhaustR", true); } if (((BaseBuffBodyBehavior)this).body.skillLocator.secondary.stock >= ((BaseBuffBodyBehavior)this).body.skillLocator.secondary.maxStock) { Util.PlaySound("ExecutionerMaxCharge", ((Component)this).gameObject); EffectManager.SimpleMuzzleFlash(plumeEffectLarge, ((Component)this).gameObject, "ExhaustL", true); EffectManager.SimpleMuzzleFlash(plumeEffectLarge, ((Component)this).gameObject, "ExhaustR", true); EffectManager.SimpleEffect(Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/LightningFlash.prefab").WaitForCompletion(), ((BaseBuffBodyBehavior)this).body.corePosition, Quaternion.identity, true); } ((BaseBuffBodyBehavior)this).body.SetAimTimer(timer); } } } public static GameObject plumeEffect = SS2Assets.LoadAsset("exePlume", SS2Bundle.Executioner2); public static GameObject plumeEffectLarge = SS2Assets.LoadAsset("exePlumeBig", SS2Bundle.Executioner2); public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("bdExeCharge", SS2Bundle.Executioner2); } public sealed class ExeMuteCharge : BuffBase { public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("bdExeMuteCharge", SS2Bundle.Executioner2); } public sealed class ExecutionerArmor : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IBodyStatArgModifier { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.BuffExecutionerArmor; } public void ModifyStatArguments(StatHookEventArgs args) { args.armorAdd += 60f; } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffExecutionerArmor", SS2Bundle.Executioner); } public sealed class ExecutionerSuperCharged : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior { private float timer; [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.BuffExecutionerSuperCharged; } public void FixedUpdate() { //IL_0172: 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_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) if (((BaseBuffBodyBehavior)this).body.baseNameToken != "SS2_EXECUTIONER2_NAME" || ((BaseBuffBodyBehavior)this).body.HasBuff(SS2Content.Buffs.bdExeMuteCharge)) { return; } timer += Time.fixedDeltaTime; if (timer >= 0.2f && ((BaseBuffBodyBehavior)this).body.skillLocator.secondary.stock < ((BaseBuffBodyBehavior)this).body.skillLocator.secondary.maxStock) { timer = 0f; ((BaseBuffBodyBehavior)this).body.skillLocator.secondary.AddOneStock(); if (((BaseBuffBodyBehavior)this).body.skillLocator.secondary.stock < ((BaseBuffBodyBehavior)this).body.skillLocator.secondary.maxStock) { Util.PlaySound("ExecutionerGainCharge", ((Component)this).gameObject); EffectManager.SimpleMuzzleFlash(plumeEffect, ((Component)this).gameObject, "ExhaustL", true); EffectManager.SimpleMuzzleFlash(plumeEffect, ((Component)this).gameObject, "ExhaustR", true); } if (((BaseBuffBodyBehavior)this).body.skillLocator.secondary.stock >= ((BaseBuffBodyBehavior)this).body.skillLocator.secondary.maxStock) { Util.PlaySound("ExecutionerMaxCharge", ((Component)this).gameObject); EffectManager.SimpleMuzzleFlash(plumeEffectLarge, ((Component)this).gameObject, "ExhaustL", true); EffectManager.SimpleMuzzleFlash(plumeEffectLarge, ((Component)this).gameObject, "ExhaustR", true); EffectManager.SimpleEffect(Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/LightningFlash.prefab").WaitForCompletion(), ((BaseBuffBodyBehavior)this).body.corePosition, Quaternion.identity, false); } ((BaseBuffBodyBehavior)this).body.SetAimTimer(1.6f); } } } public static GameObject plumeEffect = SS2Assets.LoadAsset("exePlume", SS2Bundle.Executioner2); public static GameObject plumeEffectLarge = SS2Assets.LoadAsset("exePlumeBig", SS2Bundle.Executioner2); public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffExecutionerSuperCharged", SS2Bundle.Executioner); } public sealed class Fear : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IBodyStatArgModifier { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.BuffFear; } public void ModifyStatArguments(StatHookEventArgs args) { args.moveSpeedReductionMultAdd += 0.5f; } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffFear", SS2Bundle.Executioner); public override void Initialize() { } } public sealed class Gouge : BuffBase { public static DotIndex index; public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffGouge", SS2Bundle.Nemmando); public override void Initialize() { //IL_0013: 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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown index = DotAPI.RegisterDotDef(0.25f, 0.25f, (DamageColorIndex)8, ((BuffBase)this).BuffDef, (CustomDotBehaviour)null, (CustomDotVisual)null); HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); } private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) bool flag = false; if (NetworkServer.active && damageInfo.dotIndex == index && damageInfo.procCoefficient == 0f && self.alive) { if (Object.op_Implicit((Object)(object)damageInfo.attacker)) { CharacterBody component = damageInfo.attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { damageInfo.crit = Util.CheckRoll(component.crit, component.master); } } damageInfo.procCoefficient = 0.2f; flag = true; } orig.Invoke(self, damageInfo); if (NetworkServer.active && !damageInfo.rejected && self.alive && flag) { GlobalEventManager.instance.OnHitEnemy(damageInfo, ((Component)self).gameObject); } } } public sealed class GreaterBanner : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IBodyStatArgModifier, IStatItemBehavior { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.BuffGreaterBanner; } public void ModifyStatArguments(StatHookEventArgs args) { if (((BaseBuffBodyBehavior)this).body.HasBuff(SS2Content.Buffs.BuffGreaterBanner)) { args.critAdd += GreaterWarbanner.extraCrit; args.regenMultAdd += GreaterWarbanner.extraRegeneration; } } public void RecalculateStatsEnd() { } public void RecalculateStatsStart() { } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffGreaterBanner", SS2Bundle.Equipments); } public sealed class HiddenSlow20 : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IBodyStatArgModifier { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.bdHiddenSlow20; } public void ModifyStatArguments(StatHookEventArgs args) { int buffCount = ((BaseBuffBodyBehavior)this).body.GetBuffCount(SS2Content.Buffs.bdHiddenSlow20); if (buffCount > 0) { args.moveSpeedReductionMultAdd += 0.2f * (float)buffCount; } } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("bdHiddenSlow20", SS2Bundle.Indev); } public sealed class HiddenSpeed5 : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IBodyStatArgModifier { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.bdHiddenSpeed5; } public void ModifyStatArguments(StatHookEventArgs args) { int buffCount = ((BaseBuffBodyBehavior)this).body.GetBuffCount(SS2Content.Buffs.bdHiddenSpeed5); if (buffCount > 0) { args.moveSpeedMultAdd += 0.4f * (float)buffCount; } } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("bdHiddenSpeed5", SS2Bundle.Indev); } public sealed class Insecticide : BuffBase { public static DotIndex index; public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffInsecticide", SS2Bundle.Items); public override void Initialize() { //IL_0013: 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) index = DotAPI.RegisterDotDef(0.25f, 0.15f, (DamageColorIndex)7, ((BuffBase)this).BuffDef, (CustomDotBehaviour)null, (CustomDotVisual)null); } } [DisabledContent] public sealed class Intoxicated : BuffBase { public static BuffDef buff; public static DotIndex index; public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffIntoxicated", SS2Bundle.Indev); public override void Initialize() { //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) buff = ((BuffBase)this).BuffDef; index = DotAPI.RegisterDotDef(0.5f, 0.5f, (DamageColorIndex)3, ((BuffBase)this).BuffDef, (CustomDotBehaviour)null, (CustomDotVisual)null); } } public sealed class Kickflip : BuffBase { public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffKickflip", SS2Bundle.Items); } public sealed class KnightBuff : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IBodyStatArgModifier { private ModelLocator ml; private Transform mt; private CharacterModel cm; [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.bdKnightBuff; } public void ModifyStatArguments(StatHookEventArgs args) { args.attackSpeedMultAdd += 0.4f; args.moveSpeedMultAdd += 0.4f; } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("bdKnightBuff", SS2Bundle.Indev); public override Material OverlayMaterial { get; } = SS2Assets.LoadAsset("matKnightBuffOverlay", SS2Bundle.Indev); } public sealed class KnightCharge : BuffBase { public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("bdKnightCharged", SS2Bundle.Indev); public override Material OverlayMaterial { get; } = SS2Assets.LoadAsset("matKnightSuperShield", SS2Bundle.Indev); } public sealed class KnightFortify : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IBodyStatArgModifier, IOnTakeDamageServerReceiver { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.bdFortified; } public void ModifyStatArguments(StatHookEventArgs args) { args.armorAdd += 100f; } public void OnTakeDamageServer(DamageReport damageReport) { //IL_0041: 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) if ((Object)(object)damageReport.attacker != (Object)(object)damageReport.victim && (Object)(object)damageReport.attacker != (Object)null && !damageReport.isFallDamage && !damageReport.damageInfo.rejected && !((BaseBuffBodyBehavior)this).body.HasBuff(SS2Content.Buffs.bdParry.buffIndex)) { ((BaseBuffBodyBehavior)this).body.SetBuffCount(SS2Content.Buffs.bdFortified.buffIndex, --base.buffStacks); } } public void FixedUpdate() { if (base.buffStacks > 3) { base.buffStacks = 3; } } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("bdFortified", SS2Bundle.Indev); public override Material OverlayMaterial { get; } = SS2Assets.LoadAsset("matKnightShield", SS2Bundle.Indev); } public sealed class KnightParry : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IOnIncomingDamageServerReceiver { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.bdParry; } public void OnIncomingDamageServer(DamageInfo damageInfo) { //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: 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) if (!((Object)(object)damageInfo.attacker != (Object)(object)((BaseBuffBodyBehavior)this).body) || ((BaseBuffBodyBehavior)this).body.baseNameToken != "SS2_KNIGHT_BODY_NAME") { return; } damageInfo.rejected = true; SetStateOnHurt component = damageInfo.attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Type type = ((object)component.targetStateMachine.state).GetType(); if (type != typeof(StunState) && type != typeof(ShockState) && type != typeof(FrozenState)) { component.SetStun(3f); } } ((BaseBuffBodyBehavior)this).body.AddBuff(SS2Content.Buffs.bdFortified.buffIndex); ((BaseBuffBodyBehavior)this).body.AddBuff(SS2Content.Buffs.bdFortified.buffIndex); if (((BaseBuffBodyBehavior)this).body.GetBuffCount(SS2Content.Buffs.bdFortified.buffIndex) > 3) { ((BaseBuffBodyBehavior)this).body.SetBuffCount(SS2Content.Buffs.bdFortified.buffIndex, 3); } Util.PlaySound("NemmandoDecisiveStrikeReady", ((Component)this).gameObject); ((Component)((BaseBuffBodyBehavior)this).body).GetComponent().stateMachines[1].SetNextState((EntityState)(object)new Parry()); Object.Destroy((Object)(object)this); } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("bdParry", SS2Bundle.Indev); } public sealed class KnightShield : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IBodyStatArgModifier { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.bdShield; } public void ModifyStatArguments(StatHookEventArgs args) { args.armorAdd += 100f; args.moveSpeedReductionMultAdd += 0.6f; } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("bdShield", SS2Bundle.Indev); } public sealed class LampBuff : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IBodyStatArgModifier { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.bdLampBuff; } public void ModifyStatArguments(StatHookEventArgs args) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) if (((BaseBuffBodyBehavior)this).body.HasBuff(SS2Content.Buffs.bdLampBuff) && ((BaseBuffBodyBehavior)this).body.bodyIndex != BodyCatalog.FindBodyIndex("LampBossBody")) { args.primaryCooldownMultAdd += 0.5f; args.secondaryCooldownMultAdd += 0.25f; args.damageMultAdd += 0.2f; args.moveSpeedMultAdd += 1f; } } public void OnDestroy() { ((BaseBuffBodyBehavior)this).body.RecalculateStats(); } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("bdLampBuff", SS2Bundle.Monsters); public override Material OverlayMaterial { get; } = SS2Assets.LoadAsset("matLampBuffOverlay", SS2Bundle.Monsters); } public sealed class MULENet : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IBodyStatArgModifier { private float mass; private float pushForce; [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.bdMULENet; } public void ModifyStatArguments(StatHookEventArgs args) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) if (((BaseBuffBodyBehavior)this).body.GetBuffCount(SS2Content.Buffs.bdMULENet) > 0) { ((BaseBuffBodyBehavior)this).body.rigidbody.velocity = Vector3.zero; } if (Object.op_Implicit((Object)(object)((BaseBuffBodyBehavior)this).body.characterMotor)) { mass = ((BaseBuffBodyBehavior)this).body.characterMotor.mass; } else if (Object.op_Implicit((Object)(object)((BaseBuffBodyBehavior)this).body.rigidbody)) { mass = ((BaseBuffBodyBehavior)this).body.rigidbody.mass; } if (mass < 50f) { mass = 50f; } pushForce = 50f * mass; } private void FixedUpdate() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //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_00a3: 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) if (((BaseBuffBodyBehavior)this).body.GetBuffCount(SS2Content.Buffs.bdMULENet) > 0) { Knockdown(); ((BaseBuffBodyBehavior)this).body.isSprinting = false; if (Object.op_Implicit((Object)(object)((BaseBuffBodyBehavior)this).body.characterMotor)) { ((BaseBuffBodyBehavior)this).body.characterMotor.moveDirection = Vector3.zero; } if (Object.op_Implicit((Object)(object)((BaseBuffBodyBehavior)this).body.characterDirection)) { ((BaseBuffBodyBehavior)this).body.characterDirection.moveVector = Vector3.zero; } if (Object.op_Implicit((Object)(object)((BaseBuffBodyBehavior)this).body.rigidbody)) { ((BaseBuffBodyBehavior)this).body.rigidbody.velocity = new Vector3(0f, ((BaseBuffBodyBehavior)this).body.rigidbody.velocity.y, 0f); } } } public void Knockdown() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: 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_001d: 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_002a: 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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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) //IL_008d: Expected O, but got Unknown if (NetworkServer.active) { DamageInfo val = new DamageInfo { attacker = null, inflictor = null, damage = 0f, damageColorIndex = (DamageColorIndex)0, damageType = (DamageType)0, crit = false, dotIndex = (DotIndex)(-1), force = Vector3.down * pushForce * Time.fixedDeltaTime, position = ((Component)this).transform.position, procChainMask = default(ProcChainMask), procCoefficient = 0f }; if (Object.op_Implicit((Object)(object)((BaseBuffBodyBehavior)this).body.characterMotor)) { ((BaseBuffBodyBehavior)this).body.healthComponent.TakeDamageForce(val, false, false); } else if (Object.op_Implicit((Object)(object)((BaseBuffBodyBehavior)this).body.rigidbody)) { ((BaseBuffBodyBehavior)this).body.healthComponent.TakeDamageForce(val, false, false); } } } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__4_1; public static Func <>9__4_2; public static Manipulator <>9__4_0; internal void b__4_0(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.GotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "currentSkillMeetsActivationConditions") }); val.Index += 1; val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldfld, Reflection.GetFieldCached(typeof(EntityState), "outer")); val.EmitDelegate>((Func)((bool cond, EntityStateMachine ESM) => (!Object.op_Implicit((Object)(object)((Component)ESM).GetComponent().GetBody()) || !((Component)ESM).GetComponent().GetBody().HasBuff(SS2Content.Buffs.bdMULENet)) && cond)); } internal bool b__4_1(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "currentSkillMeetsActivationConditions"); } internal bool b__4_2(bool cond, EntityStateMachine ESM) { if (Object.op_Implicit((Object)(object)((Component)ESM).GetComponent().GetBody()) && ((Component)ESM).GetComponent().GetBody().HasBuff(SS2Content.Buffs.bdMULENet)) { return false; } return cond; } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("bdMULENet", SS2Bundle.Indev); public override void Initialize() { Hook(); } internal void Hook() { //IL_0014: 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_001f: Expected O, but got Unknown object obj = <>c.<>9__4_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); val2.GotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "currentSkillMeetsActivationConditions") }); val2.Index += 1; val2.Emit(OpCodes.Ldarg_0); val2.Emit(OpCodes.Ldfld, Reflection.GetFieldCached(typeof(EntityState), "outer")); val2.EmitDelegate>((Func)((bool cond, EntityStateMachine ESM) => (!Object.op_Implicit((Object)(object)((Component)ESM).GetComponent().GetBody()) || !((Component)ESM).GetComponent().GetBody().HasBuff(SS2Content.Buffs.bdMULENet)) && cond)); }; <>c.<>9__4_0 = val; obj = (object)val; } Combat.GenerateBodyInputs += (Manipulator)obj; } } public sealed class Needle : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IOnIncomingDamageServerReceiver { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.BuffNeedle; } private void Start() { if (Object.op_Implicit((Object)(object)((BaseBuffBodyBehavior)this).body.healthComponent)) { ref IOnIncomingDamageServerReceiver[] onIncomingDamageReceivers = ref ((BaseBuffBodyBehavior)this).body.healthComponent.onIncomingDamageReceivers; IOnIncomingDamageServerReceiver val = (IOnIncomingDamageServerReceiver)(object)this; ArrayUtils.ArrayAppend(ref onIncomingDamageReceivers, ref val); } } public void OnIncomingDamageServer(DamageInfo info) { info.crit = true; } private void OnDestroy() { if (Object.op_Implicit((Object)(object)((BaseBuffBodyBehavior)this).body.healthComponent)) { int num = Array.IndexOf(((BaseBuffBodyBehavior)this).body.healthComponent.onIncomingDamageReceivers, (IOnIncomingDamageServerReceiver)(object)this); if (num > -1) { ArrayUtils.ArrayRemoveAtAndResize(ref ((BaseBuffBodyBehavior)this).body.healthComponent.onIncomingDamageReceivers, ((BaseBuffBodyBehavior)this).body.healthComponent.onIncomingDamageReceivers.Length, num); } } } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffNeedle", SS2Bundle.Items); } public sealed class NeedleBuildup : BuffBase { public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffNeedleBuildup", SS2Bundle.Items); } public sealed class NemCapManaReduction : BuffBase { public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("bdNemCapManaReduction", SS2Bundle.Indev); } public sealed class NemCapManaRegen : BuffBase { public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("bdNemCapManaRegen", SS2Bundle.Indev); } [DisabledContent] public sealed class NucleatorSpecial : BuffBase { public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffNucleatorSpecial", SS2Bundle.Indev); } public sealed class Overstress : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IBodyStatArgModifier { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.bdOverstress; } public void ModifyStatArguments(StatHookEventArgs args) { args.armorAdd -= 20f; args.moveSpeedReductionMultAdd += 0.3f; args.damageMultAdd -= 0.5f; } private void OnDestroy() { ((BaseBuffBodyBehavior)this).body.RecalculateStats(); } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("bdOverstress", SS2Bundle.Indev); } public sealed class PurplePoison : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Assets.LoadAsset("bdPurplePoison", SS2Bundle.Indev); } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("bdPurplePoison", SS2Bundle.Indev); public override void Initialize() { } } public sealed class ReactorBuff : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IOnIncomingDamageServerReceiver { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.BuffReactor; } public void OnIncomingDamageServer(DamageInfo damageInfo) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Invalid comparison between Unknown and I4 if ((int)damageInfo.damageType != 65536) { damageInfo.rejected = true; } } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffReactor", SS2Bundle.Items); public override Material OverlayMaterial => SS2Assets.LoadAsset("matReactorBuffOverlay", SS2Bundle.Items); } public sealed class Riposte : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IOnIncomingDamageServerReceiver { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.BuffRiposte; } public void OnIncomingDamageServer(DamageInfo damageInfo) { if (Object.op_Implicit((Object)(object)damageInfo.attacker)) { damageInfo.rejected = true; ((Component)this).GetComponent().AddTimedBuff(Buffs.HiddenInvincibility, 0.33f); } } } public static float invincibilityDuration; public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffRiposte", SS2Bundle.NemMercenary); public override Material OverlayMaterial => SS2Assets.LoadAsset("matReactorBuffOverlay", SS2Bundle.Items); } [DisabledContent] public sealed class Wealth : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IBodyStatArgModifier { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.BuffWealth; } public void ModifyStatArguments(StatHookEventArgs args) { args.healthMultAdd += 0.5f; args.damageMultAdd += 0.5f; } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffScavenger", SS2Bundle.Indev); } public sealed class Sigil : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IBodyStatArgModifier { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.BuffSigil; } public void ModifyStatArguments(StatHookEventArgs args) { args.armorAdd += HuntersSigil.baseArmor; args.damageMultAdd += HuntersSigil.baseDamage; } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffSigil", SS2Bundle.Items); public override Material OverlayMaterial { get; } = SS2Assets.LoadAsset("matSigilBuffOverlay", SS2Bundle.Items); } public sealed class StormBuff : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IBodyStatArgModifier { public DeathRewards deathRewards; public uint ogGoldReward; public uint ogExpReward; [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.BuffStorm; } public void Start() { deathRewards = ((Component)((BaseBuffBodyBehavior)this).body).GetComponent(); if (Object.op_Implicit((Object)(object)deathRewards)) { ogGoldReward = deathRewards.goldReward; ogExpReward = deathRewards.expReward; deathRewards.goldReward = (uint)((float)ogGoldReward * 2f); deathRewards.expReward = (uint)((float)ogExpReward * 2.5f); } } public void ModifyStatArguments(StatHookEventArgs args) { args.armorAdd += 20f; args.damageMultAdd += 0.2f; args.attackSpeedMultAdd += 0.5f; args.moveSpeedMultAdd += 0.5f; args.cooldownMultAdd += 0.2f; } public void OnDestroy() { if (Object.op_Implicit((Object)(object)deathRewards)) { deathRewards.goldReward = ogGoldReward; deathRewards.expReward = ogExpReward; } } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffStorm", SS2Bundle.Events); } public sealed class Surrender : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IStatItemBehavior { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.BuffSurrender; } public void RecalculateStatsEnd() { if (Object.op_Implicit((Object)(object)((BaseBuffBodyBehavior)this).body.skillLocator)) { if (Object.op_Implicit((Object)(object)((BaseBuffBodyBehavior)this).body.skillLocator.primary)) { GenericSkill primary = ((BaseBuffBodyBehavior)this).body.skillLocator.primary; primary.cooldownScale *= GreaterWarbanner.cooldownReduction; } if (Object.op_Implicit((Object)(object)((BaseBuffBodyBehavior)this).body.skillLocator.secondary)) { GenericSkill secondary = ((BaseBuffBodyBehavior)this).body.skillLocator.secondary; secondary.cooldownScale *= GreaterWarbanner.cooldownReduction; } if (Object.op_Implicit((Object)(object)((BaseBuffBodyBehavior)this).body.skillLocator.utility)) { GenericSkill utility = ((BaseBuffBodyBehavior)this).body.skillLocator.utility; utility.cooldownScale *= GreaterWarbanner.cooldownReduction; } if (Object.op_Implicit((Object)(object)((BaseBuffBodyBehavior)this).body.skillLocator.special)) { GenericSkill special = ((BaseBuffBodyBehavior)this).body.skillLocator.special; special.cooldownScale *= GreaterWarbanner.cooldownReduction; } } } public void RecalculateStatsStart() { } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffSurrender", SS2Bundle.Indev); } public sealed class BuffTerminationCooldown : BuffBase { public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffTerminationCooldown", SS2Bundle.Items); } public sealed class BuffTerminationFailed : BuffBase { public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffTerminationFailed", SS2Bundle.Items); } public sealed class BuffTerminationReady : BuffBase { public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffTerminationReady", SS2Bundle.Items); } public sealed class BuffTerminationVFX : BuffBase { public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffTerminationVFX", SS2Bundle.Items); public override Material OverlayMaterial => SS2Assets.LoadAsset("matTerminationOverlay", SS2Bundle.Items); } public sealed class Trematodes : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IBodyStatArgModifier { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.BuffTrematodes; } public void ModifyStatArguments(StatHookEventArgs args) { args.moveSpeedReductionMultAdd += DetritiveTrematode.trematodeSlow; } } public static DotIndex index; public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffTrematodes", SS2Bundle.Items); public override void Initialize() { //IL_0013: 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) index = DotAPI.RegisterDotDef(1f, 0.5f, (DamageColorIndex)3, ((BuffBase)this).BuffDef, (CustomDotBehaviour)null, (CustomDotVisual)null); } } [DisabledContent] public sealed class VoidLeech : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IBodyStatArgModifier { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.BuffVoidLeech; } public void ModifyStatArguments(StatHookEventArgs args) { args.moveSpeedReductionMultAdd += 1f - Mathf.Pow(0.9f, (float)base.buffStacks); args.jumpPowerMultAdd *= Mathf.Pow(0.9f, (float)base.buffStacks); } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffVoidLeech", SS2Bundle.Items); } public sealed class WatchMetronome : BuffBase { public sealed class Behavior : BaseBuffBodyBehavior, IBodyStatArgModifier { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.BuffWatchMetronome; } public void ModifyStatArguments(StatHookEventArgs args) { int buffCount = ((BaseBuffBodyBehavior)this).body.GetBuffCount(SS2Content.Buffs.BuffWatchMetronome); if (buffCount > 0 && ((BaseBuffBodyBehavior)this).body.isSprinting) { args.moveSpeedMultAdd += (float)Math.Sqrt(0.1f * (float)buffCount) * Moonstorm.Starstorm2.Items.WatchMetronome.maxMovementSpeed; } } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffWatchMetronome", SS2Bundle.Items); } public sealed class X4Buff : BuffBase { public sealed class X4BuffBehavior : BaseBuffBodyBehavior, IBodyStatArgModifier { [BuffDefAssociation] private static BuffDef GetBuffDef() { return SS2Content.Buffs.BuffX4; } public void ModifyStatArguments(StatHookEventArgs args) { if (((BaseBuffBodyBehavior)this).body.HasBuff(SS2Content.Buffs.BuffX4)) { int itemCount = MSUtil.GetItemCount(((BaseBuffBodyBehavior)this).body, SS2Content.Items.X4); float num = X4.baseRegenBoost + X4.stackRegenBoost * (float)(itemCount - 1); args.baseRegenAdd += (num + num / 5f * ((BaseBuffBodyBehavior)this).body.level) * (float)base.buffStacks; } } } public override BuffDef BuffDef { get; } = SS2Assets.LoadAsset("BuffX4", SS2Bundle.Items); } } namespace Moonstorm.Starstorm2.Modules { public sealed class Artifacts : ArtifactModuleBase { public static Artifacts Instance { get; private set; } public override R2APISerializableContentPack SerializableContentPack { get; } = ((ContentLoader)ContentLoader.Instance).SerializableContentPack; public override void Initialize() { Instance = this; ((ModuleBase)this).Initialize(); SS2Log.Info("Initializing Artifacts"); ((ArtifactModuleBase)this).GetArtifactBases(); ArtifactCodeAPI.AddCompound(SS2Assets.LoadAsset("acdStar", SS2Bundle.Artifacts)); } protected override IEnumerable GetArtifactBases() { ((ArtifactModuleBase)this).GetArtifactBases().ToList().ForEach(delegate(ArtifactBase artifact) { ((ArtifactModuleBase)this).AddArtifact(artifact, (Dictionary)null); }); return null; } } public sealed class Buffs : BuffModuleBase { public static Buffs Instance { get; set; } public override R2APISerializableContentPack SerializableContentPack { get; } = ((ContentLoader)ContentLoader.Instance).SerializableContentPack; public override void Initialize() { Instance = this; ((ModuleBase)this).Initialize(); SS2Log.Info("Initializing Buffs."); ((BuffModuleBase)this).GetBuffBases(); } protected override IEnumerable GetBuffBases() { ((BuffModuleBase)this).GetBuffBases().ToList().ForEach(delegate(BuffBase buff) { ((BuffModuleBase)this).AddBuff(buff, (Dictionary)null); }); return null; } } public sealed class Characters : CharacterModuleBase { [CompilerGenerated] private sealed class <>c__DisplayClass9_0 { public string name; internal void b__2(ConfigurableBool b) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_0064: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Survivors"; ((ConfigurableVariable)b).Key = name; ((ConfigurableVariable)b).Description = "Enable/Disable this Survivor"; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigMain; CheckBoxConfig val = new CheckBoxConfig(); object obj = <>c.<>9__9_3; if (obj == null) { IsDisabledDelegate val2 = () => !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableSurvivors); <>c.<>9__9_3 = val2; obj = (object)val2; } ((BaseOptionConfig)val).checkIfDisabled = (IsDisabledDelegate)obj; ((BaseOptionConfig)val).restartRequired = true; b.CheckBoxConfig = val; } } [CompilerGenerated] private sealed class <>c__DisplayClass9_1 { public string name; internal void b__4(ConfigurableBool b) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_0064: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Monsters"; ((ConfigurableVariable)b).Key = name; ((ConfigurableVariable)b).Description = "Enable/Disable this Monster"; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigMain; CheckBoxConfig val = new CheckBoxConfig(); object obj = <>c.<>9__9_5; if (obj == null) { IsDisabledDelegate val2 = () => !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableMonsters); <>c.<>9__9_5 = val2; obj = (object)val2; } ((BaseOptionConfig)val).checkIfDisabled = (IsDisabledDelegate)obj; ((BaseOptionConfig)val).restartRequired = true; b.CheckBoxConfig = val; } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static IsDisabledDelegate <>9__9_3; public static IsDisabledDelegate <>9__9_5; public static Func <>9__9_0; internal bool b__9_0(CharacterBase character) { if (character is SurvivorBase) { <>c__DisplayClass9_0 CS$<>8__locals0 = new <>c__DisplayClass9_0 { name = MSUtil.NicifyString(((Object)character.BodyPrefab).name) }; int num = CS$<>8__locals0.name.LastIndexOf("Body"); if (num >= 0) { CS$<>8__locals0.name = CS$<>8__locals0.name.Substring(0, num - 1); } if (!ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableSurvivors)) { return false; } return ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)ConfigLoader.MakeConfigurableBool(true, (Action)delegate(ConfigurableBool b) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_0064: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Survivors"; ((ConfigurableVariable)b).Key = CS$<>8__locals0.name; ((ConfigurableVariable)b).Description = "Enable/Disable this Survivor"; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigMain; CheckBoxConfig val3 = new CheckBoxConfig(); object obj2 = <>9__9_3; if (obj2 == null) { IsDisabledDelegate val4 = () => !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableSurvivors); <>9__9_3 = val4; obj2 = (object)val4; } ((BaseOptionConfig)val3).checkIfDisabled = (IsDisabledDelegate)obj2; ((BaseOptionConfig)val3).restartRequired = true; b.CheckBoxConfig = val3; }).DoConfigure()); } if (character is MonsterBase) { <>c__DisplayClass9_1 CS$<>8__locals1 = new <>c__DisplayClass9_1 { name = MSUtil.NicifyString(((Object)character.BodyPrefab).name) }; int num2 = CS$<>8__locals1.name.LastIndexOf("Body"); if (num2 >= 0) { CS$<>8__locals1.name = CS$<>8__locals1.name.Substring(0, num2 - 1); } if (!ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableMonsters)) { return false; } return ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)ConfigLoader.MakeConfigurableBool(true, (Action)delegate(ConfigurableBool b) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_0064: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Monsters"; ((ConfigurableVariable)b).Key = CS$<>8__locals1.name; ((ConfigurableVariable)b).Description = "Enable/Disable this Monster"; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigMain; CheckBoxConfig val = new CheckBoxConfig(); object obj = <>9__9_5; if (obj == null) { IsDisabledDelegate val2 = () => !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableMonsters); <>9__9_5 = val2; obj = (object)val2; } ((BaseOptionConfig)val).checkIfDisabled = (IsDisabledDelegate)obj; ((BaseOptionConfig)val).restartRequired = true; b.CheckBoxConfig = val; }).DoConfigure()); } SS2Log.Error(string.Concat("Character ", character, " was not a survivor or monster."), 104, "GetCharacterBases"); return false; } internal bool b__9_3() { return !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableSurvivors); } internal bool b__9_5() { return !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableMonsters); } internal void <.cctor>b__11_0(ConfigurableBool b) { //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_003e: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Enable Monsters"; ((ConfigurableVariable)b).Key = "Enable Monsters"; ((ConfigurableVariable)b).Description = "Enables Starstorm 2's monsters. Set to false to disable monsters."; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigMain; b.CheckBoxConfig = new CheckBoxConfig { restartRequired = true }; } internal void <.cctor>b__11_1(ConfigurableBool b) { //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_003e: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Enable Survivors"; ((ConfigurableVariable)b).Key = "Enable Survivors"; ((ConfigurableVariable)b).Description = "Enables Starstorm 2's survivors. Set to false to disable survivors."; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigMain; b.CheckBoxConfig = new CheckBoxConfig { restartRequired = true }; } } public static ConfigurableBool EnableMonsters = ConfigLoader.MakeConfigurableBool(true, (Action)delegate(ConfigurableBool b) { //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_003e: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Enable Monsters"; ((ConfigurableVariable)b).Key = "Enable Monsters"; ((ConfigurableVariable)b).Description = "Enables Starstorm 2's monsters. Set to false to disable monsters."; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigMain; b.CheckBoxConfig = new CheckBoxConfig { restartRequired = true }; }).DoConfigure(); public static ConfigurableBool EnableSurvivors = ConfigLoader.MakeConfigurableBool(true, (Action)delegate(ConfigurableBool b) { //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_003e: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Enable Survivors"; ((ConfigurableVariable)b).Key = "Enable Survivors"; ((ConfigurableVariable)b).Description = "Enables Starstorm 2's survivors. Set to false to disable survivors."; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigMain; b.CheckBoxConfig = new CheckBoxConfig { restartRequired = true }; }).DoConfigure(); public static Characters Instance { get; set; } public override R2APISerializableContentPack SerializableContentPack => ((ContentLoader)ContentLoader.Instance).SerializableContentPack; public override void Initialize() { Instance = this; ((ModuleBase)this).Initialize(); SS2Log.Info("Initializing Bodies."); ((CharacterModuleBase)this).GetCharacterBases(); } protected override IEnumerable GetCharacterBases() { ((CharacterModuleBase)this).GetCharacterBases().Where(delegate(CharacterBase character) { if (character is SurvivorBase) { string name = MSUtil.NicifyString(((Object)character.BodyPrefab).name); int num = name.LastIndexOf("Body"); if (num >= 0) { name = name.Substring(0, num - 1); } if (!ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableSurvivors)) { return false; } return ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)ConfigLoader.MakeConfigurableBool(true, (Action)delegate(ConfigurableBool b) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_0064: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Survivors"; ((ConfigurableVariable)b).Key = name; ((ConfigurableVariable)b).Description = "Enable/Disable this Survivor"; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigMain; CheckBoxConfig val3 = new CheckBoxConfig(); object obj2 = <>c.<>9__9_3; if (obj2 == null) { IsDisabledDelegate val4 = () => !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableSurvivors); <>c.<>9__9_3 = val4; obj2 = (object)val4; } ((BaseOptionConfig)val3).checkIfDisabled = (IsDisabledDelegate)obj2; ((BaseOptionConfig)val3).restartRequired = true; b.CheckBoxConfig = val3; }).DoConfigure()); } if (character is MonsterBase) { string name2 = MSUtil.NicifyString(((Object)character.BodyPrefab).name); int num2 = name2.LastIndexOf("Body"); if (num2 >= 0) { name2 = name2.Substring(0, num2 - 1); } if (!ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableMonsters)) { return false; } return ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)ConfigLoader.MakeConfigurableBool(true, (Action)delegate(ConfigurableBool b) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_0064: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Monsters"; ((ConfigurableVariable)b).Key = name2; ((ConfigurableVariable)b).Description = "Enable/Disable this Monster"; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigMain; CheckBoxConfig val = new CheckBoxConfig(); object obj = <>c.<>9__9_5; if (obj == null) { IsDisabledDelegate val2 = () => !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableMonsters); <>c.<>9__9_5 = val2; obj = (object)val2; } ((BaseOptionConfig)val).checkIfDisabled = (IsDisabledDelegate)obj; ((BaseOptionConfig)val).restartRequired = true; b.CheckBoxConfig = val; }).DoConfigure()); } SS2Log.Error(string.Concat("Character ", character, " was not a survivor or monster."), 104, "GetCharacterBases"); return false; }).ToList() .ForEach(delegate(CharacterBase character) { ((CharacterModuleBase)this).AddCharacter(character, (Dictionary)null); }); return null; } } public class DamageTypes : DamageTypeModuleBase { public static DamageTypes Instance { get; private set; } public override void Initialize() { Instance = this; ((ModuleBase)this).Initialize(); SS2Log.Info("Initializing DamageTypes."); ((DamageTypeModuleBase)this).GetDamageTypeBases(); } protected override IEnumerable GetDamageTypeBases() { ((DamageTypeModuleBase)this).GetDamageTypeBases().ToList().ForEach(delegate(DamageTypeBase dType) { ((DamageTypeModuleBase)this).AddDamageType(dType, (Dictionary)null); }); return null; } } public class Elites : EliteModuleBase { public static Elites Instance { get; private set; } public override R2APISerializableContentPack SerializableContentPack { get; } = ((ContentLoader)ContentLoader.Instance).SerializableContentPack; public override AssetBundle AssetBundle { get; } = ((AssetsLoader)AssetsLoader.Instance).MainAssetBundle; public override void Initialize() { Instance = this; ((ModuleBase)this).Initialize(); SS2Log.Info("Initializing Elites..."); ((EliteModuleBase)this).GetInitializedEliteEquipmentBases(); } protected override IEnumerable GetInitializedEliteEquipmentBases() { ((EliteModuleBase)this).GetInitializedEliteEquipmentBases().ToList().ForEach(delegate(EliteEquipmentBase elite) { ((EliteModuleBase)this).AddElite(elite, (List)null); }); return null; } } public sealed class Interactables : InteractableModuleBase { [CompilerGenerated] private sealed class <>c__DisplayClass9_0 { public InteractableBase interactable; internal void b__2(ConfigurableBool b) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_0073: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Interactables"; ((ConfigurableVariable)b).Key = MSUtil.NicifyString(((Object)interactable.Interactable).name); ((ConfigurableVariable)b).Description = "Enable/Disable this Interactable"; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigMain; CheckBoxConfig val = new CheckBoxConfig(); object obj = <>c.<>9__9_3; if (obj == null) { IsDisabledDelegate val2 = () => !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableInteractables); <>c.<>9__9_3 = val2; obj = (object)val2; } ((BaseOptionConfig)val).checkIfDisabled = (IsDisabledDelegate)obj; ((BaseOptionConfig)val).restartRequired = true; b.CheckBoxConfig = val; } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static IsDisabledDelegate <>9__9_3; public static Func <>9__9_0; internal bool b__9_0(InteractableBase interactable) { <>c__DisplayClass9_0 CS$<>8__locals0 = new <>c__DisplayClass9_0 { interactable = interactable }; if (!ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableInteractables)) { return false; } return ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)ConfigLoader.MakeConfigurableBool(true, (Action)delegate(ConfigurableBool b) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_0073: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Interactables"; ((ConfigurableVariable)b).Key = MSUtil.NicifyString(((Object)CS$<>8__locals0.interactable.Interactable).name); ((ConfigurableVariable)b).Description = "Enable/Disable this Interactable"; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigMain; CheckBoxConfig val = new CheckBoxConfig(); object obj = <>9__9_3; if (obj == null) { IsDisabledDelegate val2 = () => !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableInteractables); <>9__9_3 = val2; obj = (object)val2; } ((BaseOptionConfig)val).checkIfDisabled = (IsDisabledDelegate)obj; ((BaseOptionConfig)val).restartRequired = true; b.CheckBoxConfig = val; }).DoConfigure()); } internal bool b__9_3() { return !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableInteractables); } internal void <.cctor>b__11_0(ConfigurableBool b) { //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_003e: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Enable All Interactables"; ((ConfigurableVariable)b).Key = "Enable All Interactables"; ((ConfigurableVariable)b).Description = "Enables Starstorm 2's interactables. Set to false to disable interactables."; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigMain; b.CheckBoxConfig = new CheckBoxConfig { restartRequired = true }; } } public static ConfigurableBool EnableInteractables = ConfigLoader.MakeConfigurableBool(true, (Action)delegate(ConfigurableBool b) { //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_003e: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Enable All Interactables"; ((ConfigurableVariable)b).Key = "Enable All Interactables"; ((ConfigurableVariable)b).Description = "Enables Starstorm 2's interactables. Set to false to disable interactables."; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigMain; b.CheckBoxConfig = new CheckBoxConfig { restartRequired = true }; }).DoConfigure(); public static Interactables Instance { get; private set; } public override R2APISerializableContentPack SerializableContentPack { get; } = ((ContentLoader)ContentLoader.Instance).SerializableContentPack; public override void Initialize() { Instance = this; ((ModuleBase)this).Initialize(); if (ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableInteractables)) { SS2Log.Info("Initializing Interactables."); ((InteractableModuleBase)this).GetInteractableBases(); } } protected override IEnumerable GetInteractableBases() { (from interactable in ((InteractableModuleBase)this).GetInteractableBases() where ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableInteractables) && ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)ConfigLoader.MakeConfigurableBool(true, (Action)delegate(ConfigurableBool b) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_0073: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Interactables"; ((ConfigurableVariable)b).Key = MSUtil.NicifyString(((Object)interactable.Interactable).name); ((ConfigurableVariable)b).Description = "Enable/Disable this Interactable"; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigMain; CheckBoxConfig val = new CheckBoxConfig(); object obj = <>c.<>9__9_3; if (obj == null) { IsDisabledDelegate val2 = () => !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableInteractables); <>c.<>9__9_3 = val2; obj = (object)val2; } ((BaseOptionConfig)val).checkIfDisabled = (IsDisabledDelegate)obj; ((BaseOptionConfig)val).restartRequired = true; b.CheckBoxConfig = val; }).DoConfigure()) select interactable).ToList().ForEach(delegate(InteractableBase interactable) { ((InteractableModuleBase)this).AddInteractable(interactable, (Dictionary)null); }); return null; } } public sealed class ItemTiers : ItemTierModuleBase { public static ItemTiers Instance { get; private set; } public override R2APISerializableContentPack SerializableContentPack => ((ContentLoader)ContentLoader.Instance).SerializableContentPack; public override void Initialize() { Instance = this; ((ModuleBase)this).Initialize(); SS2Log.Info("Initializing Item Tiers..."); ((ItemTierModuleBase)this).GetItemTierBases(); } protected override IEnumerable GetItemTierBases() { ((ItemTierModuleBase)this).GetItemTierBases().ToList().ForEach(delegate(ItemTierBase itemTier) { ((ItemTierModuleBase)this).AddItemTier(itemTier, (Dictionary)null); }); return null; } } public sealed class Equipments : EquipmentModuleBase { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static IsDisabledDelegate <>9__8_3; public static IsDisabledDelegate <>9__10_1; internal bool b__8_3() { return !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableEquipments); } internal bool b__10_1() { return !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableEquipments); } internal void <.cctor>b__12_0(ConfigurableBool b) { //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_003e: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Enable All Equipments"; ((ConfigurableVariable)b).Key = "Enable All Equipments"; ((ConfigurableVariable)b).Description = "Enables Starstorm 2's equipments. Set to false to disable all equipments."; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigItem; b.CheckBoxConfig = new CheckBoxConfig { restartRequired = true }; } } public static ConfigurableBool EnableEquipments = ConfigLoader.MakeConfigurableBool(true, (Action)delegate(ConfigurableBool b) { //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_003e: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Enable All Equipments"; ((ConfigurableVariable)b).Key = "Enable All Equipments"; ((ConfigurableVariable)b).Description = "Enables Starstorm 2's equipments. Set to false to disable all equipments."; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigItem; b.CheckBoxConfig = new CheckBoxConfig { restartRequired = true }; }).DoConfigure(); public static Equipments Instance { get; private set; } public override R2APISerializableContentPack SerializableContentPack => ((ContentLoader)ContentLoader.Instance).SerializableContentPack; public override void Initialize() { Instance = this; ((ModuleBase)this).Initialize(); SS2Log.Info("Initializing Equipments..."); ((EquipmentModuleBase)this).GetEquipmentBases(); ((EquipmentModuleBase)this).GetEliteEquipmentBases(); } protected override IEnumerable GetEquipmentBases() { ((EquipmentModuleBase)this).GetEquipmentBases().ToList().ForEach(delegate(EquipmentBase eqp) { if (eqp.EquipmentDef.cooldown != 0f) { string niceName = MSUtil.NicifyString(((object)eqp).GetType().Name); ConfigLoader.MakeConfigurableFloat(eqp.EquipmentDef.cooldown, (Action)delegate(ConfigurableFloat f) { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown ((ConfigurableVariable)f).Section = niceName; ((ConfigurableVariable)f).Key = "Cooldown"; ((ConfigurableVariable)f).Description = "Cooldown of this equipment in seconds"; ((ConfigurableVariable)f).ConfigFile = SS2Config.ConfigItem; f.UseStepSlider = false; ((ConfigurableVariable)(object)f).OnConfigChanged += delegate(float f1) { eqp.EquipmentDef.cooldown = f1; }; SliderConfig val = new SliderConfig(); object obj = <>c.<>9__8_3; if (obj == null) { IsDisabledDelegate val2 = () => !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableEquipments); <>c.<>9__8_3 = val2; obj = (object)val2; } ((BaseOptionConfig)val).checkIfDisabled = (IsDisabledDelegate)obj; val.min = 0f; val.max = 600f; val.formatString = "{0:0.0}"; f.SliderConfig = val; }).DoConfigure(); } ((EquipmentModuleBase)this).AddEquipment(eqp, (Dictionary)null); }); ((EquipmentModuleBase)this).GetEquipmentBases().ToList().ForEach(CheckEnabledStatus); return null; } protected override IEnumerable GetEliteEquipmentBases() { ((EquipmentModuleBase)this).GetEliteEquipmentBases().ToList().ForEach(delegate(EliteEquipmentBase eeqp) { ((EquipmentModuleBase)this).AddEliteEquipment(eeqp, (Dictionary)null); }); return null; } private void CheckEnabledStatus(EquipmentBase eqp) { string niceName = MSUtil.NicifyString(((object)eqp).GetType().Name); if (eqp.EquipmentDef.dropOnDeathChance > 0f || Object.op_Implicit((Object)(object)eqp.EquipmentDef.passiveBuffDef) || niceName.ToLower().Contains("affix")) { return; } ConfigurableBool val = ConfigLoader.MakeConfigurableBool(true, (Action)delegate(ConfigurableBool b) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_0064: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown ((ConfigurableVariable)b).Section = niceName; ((ConfigurableVariable)b).Key = "Enabled"; ((ConfigurableVariable)b).Description = "Should this equipment be enabled?"; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigItem; CheckBoxConfig val2 = new CheckBoxConfig(); object obj = <>c.<>9__10_1; if (obj == null) { IsDisabledDelegate val3 = () => !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableEquipments); <>c.<>9__10_1 = val3; obj = (object)val3; } ((BaseOptionConfig)val2).checkIfDisabled = (IsDisabledDelegate)obj; ((BaseOptionConfig)val2).restartRequired = true; b.CheckBoxConfig = val2; }).DoConfigure(); if (!ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableEquipments) || !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)val)) { eqp.EquipmentDef.canDrop = false; eqp.EquipmentDef.appearsInSinglePlayer = false; eqp.EquipmentDef.appearsInMultiPlayer = false; eqp.EquipmentDef.canBeRandomlyTriggered = false; eqp.EquipmentDef.enigmaCompatible = false; eqp.EquipmentDef.dropOnDeathChance = 0f; } } } public sealed class Items : ItemModuleBase { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Action <>9__11_0; public static IsDisabledDelegate <>9__13_1; internal void b__11_0(ItemBase i) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Invalid comparison between Unknown and I4 if ((int)i.ItemDef.deprecatedTier == 5) { i.ItemDef.tier = (ItemTier)5; } } internal bool b__13_1() { return !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableItems); } internal void <.cctor>b__15_0(ConfigurableBool b) { //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_003e: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Enable All Items"; ((ConfigurableVariable)b).Key = "Enable All Items"; ((ConfigurableVariable)b).Description = "Enables Starstorm 2's items. Set to false to disable all items"; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigItem; b.CheckBoxConfig = new CheckBoxConfig { restartRequired = true }; } } public static ConfigurableBool EnableItems = ConfigLoader.MakeConfigurableBool(true, (Action)delegate(ConfigurableBool b) { //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_003e: Expected O, but got Unknown ((ConfigurableVariable)b).Section = "Enable All Items"; ((ConfigurableVariable)b).Key = "Enable All Items"; ((ConfigurableVariable)b).Description = "Enables Starstorm 2's items. Set to false to disable all items"; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigItem; b.CheckBoxConfig = new CheckBoxConfig { restartRequired = true }; }).DoConfigure(); private static IEnumerable items; public static Items Instance { get; private set; } public BaseUnityPlugin MainClass => (BaseUnityPlugin)(object)Starstorm.instance; public override R2APISerializableContentPack SerializableContentPack => ((ContentLoader)ContentLoader.Instance).SerializableContentPack; public override void Initialize() { Instance = this; ((ModuleBase)this).Initialize(); SS2Log.Info("Initializing Items..."); items = ((ItemModuleBase)this).GetItemBases(); } [SystemInitializer(new Type[] { typeof(ItemTierCatalog) })] public static void TierInit() { SS2Log.Info("Post-Initializing Items..."); items.ToList().ForEach(delegate(ItemBase i) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Invalid comparison between Unknown and I4 if ((int)i.ItemDef.deprecatedTier == 5) { i.ItemDef.tier = (ItemTier)5; } }); } protected override IEnumerable GetItemBases() { List list = ((ItemModuleBase)this).GetItemBases().ToList(); list.ForEach(delegate(ItemBase item) { ((ItemModuleBase)this).AddItem(item, (Dictionary)null); }); list.ForEach(CheckEnabledStatus); return list; } public void CheckEnabledStatus(ItemBase item) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Invalid comparison between Unknown and I4 //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Invalid comparison between Unknown and I4 //IL_006c: Unknown result type (might be due to invalid IL or missing references) if ((int)item.ItemDef.deprecatedTier == 5 && (int)item.ItemDef.tier != 10) { return; } string niceName = MSUtil.NicifyString(((object)item).GetType().Name); ConfigurableBool val = ConfigLoader.MakeConfigurableBool(true, (Action)delegate(ConfigurableBool b) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_0064: Expected O, but got Unknown //IL_004f: 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) //IL_005a: Expected O, but got Unknown ((ConfigurableVariable)b).Section = niceName; ((ConfigurableVariable)b).Key = "Enabled"; ((ConfigurableVariable)b).Description = "Should this item be enabled"; ((ConfigurableVariable)b).ConfigFile = SS2Config.ConfigItem; CheckBoxConfig val2 = new CheckBoxConfig { restartRequired = true }; object obj = <>c.<>9__13_1; if (obj == null) { IsDisabledDelegate val3 = () => !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableItems); <>c.<>9__13_1 = val3; obj = (object)val3; } ((BaseOptionConfig)val2).checkIfDisabled = (IsDisabledDelegate)obj; b.CheckBoxConfig = val2; }).DoConfigure(); if (!ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)EnableItems) || !ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)val)) { item.ItemDef.deprecatedTier = (ItemTier)5; } } } public sealed class Projectiles : ProjectileModuleBase { public static Projectiles Instance { get; set; } public override R2APISerializableContentPack SerializableContentPack { get; } = ((ContentLoader)ContentLoader.Instance).SerializableContentPack; public override void Initialize() { Instance = this; ((ModuleBase)this).Initialize(); SS2Log.Info("Initializing Projectiles."); ((ProjectileModuleBase)this).GetProjectileBases(); } protected override IEnumerable GetProjectileBases() { ((ProjectileModuleBase)this).GetProjectileBases().ToList().ForEach(delegate(ProjectileBase projectile) { ((ProjectileModuleBase)this).AddProjectile(projectile, (Dictionary)null); }); return null; } } public sealed class Scenes : SceneModuleBase { public static Scenes Instance { get; private set; } public override R2APISerializableContentPack SerializableContentPack { get; } = ((ContentLoader)ContentLoader.Instance).SerializableContentPack; public override void Initialize() { Instance = this; ((ModuleBase)this).Initialize(); SS2Log.Info("Initializing Scenes."); ((SceneModuleBase)this).GetSceneBases(); } public override IEnumerable GetSceneBases() { ((SceneModuleBase)this).GetSceneBases().ToList().ForEach(delegate(SceneBase scene) { ((SceneModuleBase)this).AddScene(scene, (Dictionary)null); }); return null; } } public sealed class Unlockables : UnlockablesModuleBase { public static Unlockables Instance { get; private set; } public override R2APISerializableContentPack SerializableContentPack { get; } = ((ContentLoader)ContentLoader.Instance).SerializableContentPack; public override void Initialize() { Instance = this; ((ModuleBase)this).Initialize(); SS2Log.Info("Initializing Unlockables."); ((UnlockablesModuleBase)this).GetUnlockableBases(); } protected override IEnumerable GetUnlockableBases() { IEnumerable source = ((UnlockablesModuleBase)this).GetUnlockableBases(); if (ConfigurableVariable.op_Implicit((ConfigurableVariable)(object)SS2Config.UnlockAll)) { RemoveAllNonSkinUnlocks(); source = source.Where((UnlockableBase unlock) => ((UnlockableDef)unlock.UnlockableDef).cachedName.Contains("skin")); } source.ToList().ForEach(delegate(UnlockableBase unlock) { ((UnlockablesModuleBase)this).AddUnlockable(unlock, (Dictionary)null); }); return null; } private void RemoveAllNonSkinUnlocks() { foreach (Object item in from asset in SS2Assets.LoadAllAssetsOfType(SS2Bundle.All) where !(asset is SkinDef) where ((object)asset).GetType().GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).Where(delegate(FieldInfo fInfo) { bool num = !fInfo.IsStatic; bool flag = Reflection.IsSameOrSubclassOf(fInfo.FieldType); return num && flag; }) .Count() > 0 select asset) { FieldInfo[] array = (from fieldInfo in ((object)item).GetType().GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic) where Reflection.IsSameOrSubclassOf(fieldInfo.FieldType) select fieldInfo).ToArray(); for (int i = 0; i < array.Length; i++) { array[i].SetValue(item, null); } } } } public static class SkinSpecificOverrides { public static SkillDef phaseRoundDef; public static EntityStateConfiguration phaseRoundESC; private static GameObject toolbotLunarSpear = Addressables.LoadAssetAsync((object)"RoR2/Base/Huntress/TracerHuntressSnipe.prefab").WaitForCompletion(); internal static Material matLunarGolem; [SystemInitializer(new Type[] { })] public static void Initialize() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GenericProjectileBaseState.FireProjectile += new hook_FireProjectile(GPBS_FireProjectile); GenericBulletBaseState.FireBullet += new hook_FireBullet(GBBS_FireBullet); CharacterBody.onBodyStartGlobal += BodyStartGlobal; matLunarGolem = Object.Instantiate(Resources.Load("Prefabs/CharacterBodies/LunarGolemBody").GetComponentInChildren().baseRendererInfos[0].defaultMaterial); BaseNailgunState.FireBullet += new hook_FireBullet(BaseNailgunState_FireBullet); FireSpear.FireBullet += new hook_FireBullet(FireSpear_FireBullet); ToolbotDualWield.OnEnter += new hook_OnEnter(ToolbotDualWield_OnEnter); } public static void GPBS_FireProjectile(orig_FireProjectile orig, GenericProjectileBaseState self) { if (((EntityState)self).characterBody.baseNameToken == "COMMANDO_BODY_NAME" && (Object)(object)self.projectilePrefab == (Object)(object)ProjectileCatalog.GetProjectilePrefab(ProjectileCatalog.FindProjectileIndex("FMJRamping")) && ((Component)((EntityState)self).GetModelTransform()).GetComponentInChildren().skins[((EntityState)self).characterBody.skinIndex].nameToken == "SS2_SKIN_COMMANDO_VESTIGE") { GameObject projectilePrefab = self.projectilePrefab; ProjectileController component = projectilePrefab.GetComponent(); ProjectileOverlapAttack component2 = projectilePrefab.GetComponent(); component.ghostPrefab = SS2Assets.LoadAsset("FMJRampingGhostRed", SS2Bundle.NemCommando); component2.impactEffect = SS2Assets.LoadAsset("OmniExplosionVFXFMJRed", SS2Bundle.NemCommando); self.effectPrefab = SS2Assets.LoadAsset("MuzzleflashNemCommandoRed", SS2Bundle.NemCommando); } orig.Invoke(self); } private static void BodyStartGlobal(CharacterBody body) { if (NetworkServer.active && body.baseNameToken == "TOOLBOT_BODY_NAME" && ((Component)body.modelLocator.modelBaseTransform).GetComponentInChildren().skins[body.skinIndex].nameToken == "SS2_SKIN_TOOLBOT_GRANDMASTERY") { LoopSoundWhileCharacterMoving component = ((Component)body).GetComponent(); component.startSoundName = "Play_lunar_golem_idle_loop"; component.stopSoundName = "Stop_lunar_golem_idle_loop"; component.minSpeed = 0f; } } public static void GBBS_FireBullet(orig_FireBullet orig, GenericBulletBaseState self, Ray aimRay) { //IL_00df: 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) //IL_005a: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)self).characterBody.baseNameToken == "COMMANDO_BODY_NAME" && ((Component)((EntityState)self).GetModelTransform()).GetComponentInChildren().skins[((EntityState)self).characterBody.skinIndex].nameToken == "SS2_SKIN_COMMANDO_VESTIGE") { if ((Object)(object)self.tracerEffectPrefab == (Object)(object)Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/TracerCommandoShotgun.prefab").WaitForCompletion()) { self.tracerEffectPrefab = SS2Assets.LoadAsset("TracerNemCommandoShotgunRed", SS2Bundle.NemCommando); } if ((Object)(object)self.muzzleFlashPrefab == (Object)(object)Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/MuzzleflashFMJ.prefab").WaitForCompletion()) { self.muzzleFlashPrefab = SS2Assets.LoadAsset("MuzzleflashNemCommandoRed", SS2Bundle.NemCommando); } if ((Object)(object)self.hitEffectPrefab == (Object)(object)Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/HitsparkCommandoShotgun.prefab").WaitForCompletion()) { self.hitEffectPrefab = SS2Assets.LoadAsset("HitsparkNemCommandoRed", SS2Bundle.NemCommando); } } orig.Invoke(self, aimRay); } public static void ToolbotDash_OnEnter(orig_OnEnter orig, ToolbotDash self) { bool flag = false; string startSoundString = ToolbotDash.startSoundString; string endSoundString = ToolbotDash.endSoundString; if (((Component)((EntityState)self).GetModelTransform()).GetComponentInChildren().skins[((EntityState)self).characterBody.skinIndex].nameToken == "SS2_SKIN_TOOLBOT_GRANDMASTERY") { flag = true; ToolbotDash.startSoundString = ChargeTwinShot.chargeSoundString; ToolbotDash.endSoundString = "Play_lunar_golem_death"; } orig.Invoke(self); if (flag) { ToolbotDash.startSoundString = startSoundString; ToolbotDash.endSoundString = endSoundString; } } public static void ToolbotDualWield_OnEnter(orig_OnEnter orig, ToolbotDualWield self) { bool flag = false; string enterSfx = ToolbotDualWieldStart.enterSfx; if (((Component)((EntityState)self).GetModelTransform()).GetComponentInChildren().skins[((EntityState)self).characterBody.skinIndex].nameToken == "SS2_SKIN_TOOLBOT_GRANDMASTERY") { flag = true; ToolbotDualWieldStart.enterSfx = ChargeTwinShot.chargeSoundString; } orig.Invoke(self); if (flag) { ((Renderer)self.coverLeftInstance.GetComponentInChildren()).material = matLunarGolem; ((Renderer)self.coverRightInstance.GetComponentInChildren()).material = matLunarGolem; ToolbotDualWieldStart.enterSfx = enterSfx; } } public static void FireSpear_FireBullet(orig_FireBullet orig, FireSpear self, Ray aimRay) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) bool flag = false; GameObject tracerEffectPrefab = ((GenericBulletBaseState)self).tracerEffectPrefab; if (((Component)((EntityState)self).GetModelTransform()).GetComponentInChildren().skins[((EntityState)self).characterBody.skinIndex].nameToken == "SS2_SKIN_TOOLBOT_GRANDMASTERY") { flag = true; ((GenericBulletBaseState)self).tracerEffectPrefab = toolbotLunarSpear; } orig.Invoke(self, aimRay); if (flag) { ((GenericBulletBaseState)self).tracerEffectPrefab = tracerEffectPrefab; } } private static void BaseNailgunState_FireBullet(orig_FireBullet orig, BaseNailgunState self, Ray aimRay, int bulletCount, float spreadPitchScale, float spreadYawScale) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) bool flag = false; GameObject tracerEffectPrefab = BaseNailgunState.tracerEffectPrefab; string fireSoundString = BaseNailgunState.fireSoundString; if (((Component)((EntityState)self).GetModelTransform()).GetComponentInChildren().skins[((EntityState)self).characterBody.skinIndex].nameToken == "SS2_SKIN_TOOLBOT_GRANDMASTERY") { flag = true; BaseNailgunState.tracerEffectPrefab = Resources.Load("Prefabs/Effects/Tracers/TracerLunarWispMinigun"); BaseNailgunState.fireSoundString = FireLunarGuns.fireSound; } orig.Invoke(self, aimRay, bulletCount, spreadPitchScale, spreadYawScale); if (flag) { BaseNailgunState.tracerEffectPrefab = tracerEffectPrefab; BaseNailgunState.fireSoundString = fireSoundString; } } } } namespace Moonstorm.Starstorm2.Artifacts { [DisabledContent] public class Adversity : ArtifactBase { private static bool shouldUpgradeTP; private static float timer; public override ArtifactDef ArtifactDef { get; } = SS2Assets.LoadAsset("Adversity", SS2Bundle.Artifacts); public override void OnArtifactDisabled() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown SceneDirector.Start -= new hook_Start(SceneDirector_Start); shouldUpgradeTP = false; Ethereal.adversityEnabled = false; } public override void OnArtifactEnabled() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown SceneDirector.Start += new hook_Start(SceneDirector_Start); shouldUpgradeTP = false; Ethereal.adversityEnabled = true; } public static void SceneDirector_Start(orig_Start orig, SceneDirector self) { //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) orig.Invoke(self); Scene activeScene = SceneManager.GetActiveScene(); string name = ((Scene)(ref activeScene)).name; if (Object.op_Implicit((Object)(object)self.teleporterInstance) && (name == "skymeadow" || name == "slumberingsatellite")) { TeleporterUpgradeController component = self.teleporterInstance.GetComponent(); if ((Object)(object)component != (Object)null) { component.UpgradeTeleporter(); } } } } public sealed class Cognation : ArtifactBase { [RooConfigurableField("SS2.Artifacts", ConfigDesc = "Whether or not cognation ghosts inherit all items from the original body")] public static bool InheritInventory = true; private static readonly List blacklistedMasterIndices = new List(); public static readonly List blacklistedMasters = new List { "ArtifactShell", "BrotherHurt", "VoidInfestor" }; private static bool hasMadeList; private static List illegalGhosts = new List(); public override ArtifactDef ArtifactDef { get; } = SS2Assets.LoadAsset("Cognation", SS2Bundle.Artifacts); public override ArtifactCode ArtifactCode { get; } = SS2Assets.LoadAsset("CognationCode", SS2Bundle.Artifacts); public static ReadOnlyCollection BlacklistedMasterIndices { get; private set; } [SystemInitializer(new Type[] { typeof(MasterCatalog) })] private static void SystemInit() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) foreach (string item in new List { "ArtifactShell", "BrotherHurt", "VoidInfestor" }) { MasterIndex val = MasterCatalog.FindMasterIndex(item); if (val != MasterIndex.none) { SS2Log.Info(string.Concat("Adding ", item, " with index ", val, " to cognation banlist")); AddMasterToBlacklist(val); } } } public static void AddMasterToBlacklist(MasterIndex masterIndex) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_002c: 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) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) if (masterIndex == MasterIndex.none) { SS2Log.Debug("Tried to add a master to the blacklist, but it's index is none.", 57, "AddMasterToBlacklist"); return; } if (blacklistedMasterIndices.Contains(masterIndex)) { GameObject masterPrefab = MasterCatalog.GetMasterPrefab(masterIndex); SS2Log.Debug($"Master Prefab {masterPrefab} is already blacklisted.", 64, "AddMasterToBlacklist"); return; } blacklistedMasterIndices.Add(masterIndex); BlacklistedMasterIndices = new ReadOnlyCollection(blacklistedMasterIndices); foreach (MasterIndex blacklistedMasterIndex in BlacklistedMasterIndices) { SS2Log.Info("Collected indexes: " + blacklistedMasterIndex); } } private static void InitializeIllegalGhostList() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Invalid comparison between Unknown and I4 //IL_003f: Unknown result type (might be due to invalid IL or missing references) foreach (string item in new List { "BrotherHurtBody", "VoidInfestorBody", "ArtifactShellBody" }) { BodyIndex val = BodyCatalog.FindBodyIndexCaseInsensitive(item); if ((int)val != -1) { AddBodyToIllegalTerminationList(val); } } } public static void AddBodyToIllegalTerminationList(BodyIndex bodyIndex) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Invalid comparison between Unknown and I4 //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) if ((int)bodyIndex == -1) { SS2Log.Info("Tried to add a body to the illegal ghost list, but it's index is none"); } else if (illegalGhosts.Contains(bodyIndex)) { GameObject bodyPrefab = BodyCatalog.GetBodyPrefab(bodyIndex); SS2Log.Info($"Body prefab {bodyPrefab} is already in the illegal ghost list."); } else { illegalGhosts.Add(bodyIndex); } } public override void Initialize() { } private void AddCode(Scene arg0, LoadSceneMode arg1) { //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_0042: 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_007f: Unknown result type (might be due to invalid IL or missing references) if (((Scene)(ref arg0)).name == "lobby") { GameObject obj = Object.Instantiate(SS2Assets.LoadAsset("CognationCode", SS2Bundle.Artifacts), Vector3.zero, Quaternion.identity); obj.transform.position = new Vector3(4f, 0f, 8f); obj.transform.rotation = Quaternion.Euler(10f, 90f, 0f); obj.transform.localScale = new Vector3(0.3f, 0.3f, 0.3f); } } public override void OnArtifactEnabled() { GlobalEventManager.onCharacterDeathGlobal += SpawnCognationGhost; } public override void OnArtifactDisabled() { GlobalEventManager.onCharacterDeathGlobal -= SpawnCognationGhost; } private void SpawnCognationGhost(DamageReport report) { if (!hasMadeList) { InitializeIllegalGhostList(); hasMadeList = true; } CharacterMaster victimMaster = report.victimMaster; if (Object.op_Implicit((Object)(object)victimMaster) && CanBecomeGhost(victimMaster)) { MasterSummon val = PrepareMasterSummon(victimMaster); if (val != null) { SummonGhost(val.Perform(), victimMaster); } } } private string AddCognateName(orig_GetBestBodyName orig, GameObject bodyObject) { CharacterBody component = bodyObject.GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory) && component.inventory.GetItemCount(SS2Content.Items.Cognation) > 0) { return "Cognate " + orig.Invoke(bodyObject); } return orig.Invoke(bodyObject); } private bool CanBecomeGhost(CharacterMaster victimMaster) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Invalid comparison between Unknown and I4 //IL_002d: 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_004b: Unknown result type (might be due to invalid IL or missing references) bool num = (int)victimMaster.teamIndex != 1; bool hasBody = victimMaster.hasBody; bool flag = victimMaster.inventory.GetItemCount(SS2Content.Items.Cognation) == 0; bool flag2 = !illegalGhosts.Contains(victimMaster.backupBodyIndex); bool flag3 = victimMaster.inventory.currentEquipmentIndex != Equipment.EliteVoidEquipment.equipmentIndex; return num && hasBody && flag && flag2 && flag3; } private MasterSummon PrepareMasterSummon(CharacterMaster master) { //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_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003f: 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) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown CharacterBody body = master.GetBody(); MasterSummon val = new MasterSummon { ignoreTeamMemberLimit = true, masterPrefab = MasterCatalog.GetMasterPrefab(master.masterIndex), position = body.corePosition }; Ray aimRay = body.inputBank.GetAimRay(); val.rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction); val.teamIndexOverride = master.teamIndex; val.summonerBodyObject = null; val.inventoryToCopy = (InheritInventory ? master.inventory : null); return val; } private void SummonGhost(CharacterMaster ghostMaster, CharacterMaster originalMaster) { //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) CharacterBody body = originalMaster.GetBody(); CharacterBody body2 = ghostMaster.GetBody(); if (NetworkServer.active) { body2.AddTimedBuff(Buffs.SmallArmorBoost, 1f); DeathRewards component = ((Component)body2).GetComponent(); DeathRewards component2 = ((Component)body).GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component2)) { component.goldReward = (uint)((float)component2.goldReward / 1.25f); component.expReward = (uint)((double)component2.expReward / 1.25); } if (Object.op_Implicit((Object)(object)body2)) { EntityStateMachine[] components = ((Component)body2).GetComponents(); foreach (EntityStateMachine obj in components) { obj.initialStateType = obj.mainStateType; } } ghostMaster.inventory.SetEquipmentIndex(originalMaster.inventory.currentEquipmentIndex); ghostMaster.inventory.GiveItem(SS2Content.Items.Cognation, 1); } ((Component)ghostMaster).gameObject.AddComponent().lifeTimer = ((body.isChampion || body.isBoss) ? 60 : 30); } } [DisabledContent] public sealed class Deviation : ArtifactBase { public override ArtifactDef ArtifactDef { get; } = SS2Assets.LoadAsset("Deviation", SS2Bundle.Artifacts); public override ArtifactCode ArtifactCode { get; } = SS2Assets.LoadAsset("DeviationCode", SS2Bundle.Artifacts); public override void Initialize() { } private void DeviationOverride(orig_OnInteractionBegin orig, BaseState self, Interactor activator) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown SS2Log.Info(((Object)((Component)((EntityState)self).outer).gameObject).name); if (!Object.op_Implicit((Object)(object)((Component)((EntityState)self).outer).gameObject.GetComponent())) { Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "Yummy eating input" }); ((Component)((EntityState)self).outer).gameObject.AddComponent(); } else { orig.Invoke(self, activator); } } private void AddCode(Scene arg0, LoadSceneMode arg1) { //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_0042: 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_007f: Unknown result type (might be due to invalid IL or missing references) if (((Scene)(ref arg0)).name == "lobby") { GameObject obj = Object.Instantiate(SS2Assets.LoadAsset("CognationCode", SS2Bundle.Artifacts), Vector3.zero, Quaternion.identity); obj.transform.position = new Vector3(4f, 0f, 8f); obj.transform.rotation = Quaternion.Euler(10f, 90f, 0f); obj.transform.localScale = new Vector3(0.3f, 0.3f, 0.3f); } } public override void OnArtifactEnabled() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown IdleState.OnInteractionBegin += new hook_OnInteractionBegin(DeviationOverride); } public override void OnArtifactDisabled() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown IdleState.OnInteractionBegin -= new hook_OnInteractionBegin(DeviationOverride); } } internal class DeviationState : BaseTeleporterState { public override ActivationState backwardsCompatibleActivationState => (ActivationState)3; private CombatDirector bonusDirector => ((BaseTeleporterState)this).teleporterInteraction.bonusDirector; private CombatDirector bossDirector => ((BaseTeleporterState)this).teleporterInteraction.bossDirector; } public class TestComponent : MonoBehaviour { } public class Havoc : ArtifactBase { public override ArtifactDef ArtifactDef { get; } = SS2Assets.LoadAsset("Havoc", SS2Bundle.Artifacts); public override ArtifactCode ArtifactCode { get; } = SS2Assets.LoadAsset("HavocCode", SS2Bundle.Artifacts); public override void OnArtifactDisabled() { } public override void OnArtifactEnabled() { } } } namespace Moonstorm.Starstorm2.Survivors { [DisabledContent] public sealed class NemesisHuntress : SurvivorBase { public static BodyIndex bodyIndex; public static GameObject crosshairPrefab; public override GameObject BodyPrefab { get; } = SS2Assets.LoadAsset("NemHuntress2Body", SS2Bundle.Indev); public override GameObject MasterPrefab { get; } = SS2Assets.LoadAsset("NemmandoMonsterMaster", SS2Bundle.Nemmando); public override SurvivorDef SurvivorDef { get; } = SS2Assets.LoadAsset("survivorNemHuntress2", SS2Bundle.Indev); private GameObject footstepDust { get; set; } = Resources.Load("Prefabs/GenericFootstepDust"); public override void Initialize() { //IL_0017: 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) ((CharacterBase)this).Initialize(); _ = Starstorm.ScepterInstalled; bodyIndex = ((CharacterBase)this).BodyPrefab.GetComponent().bodyIndex; crosshairPrefab = ((CharacterBase)this).BodyPrefab.GetComponent().defaultCrosshairPrefab; } private void CrosshairManager_UpdateCrosshair(orig_UpdateCrosshair orig, CrosshairManager self, CharacterBody characterBody, Vector3 crosshairWorldPosition, Camera uiCamera) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) if (characterBody.baseNameToken == "SS2_NEMHUNTRESS2_BODY_NAME" && characterBody.isSprinting) { self.currentCrosshairPrefab = characterBody.defaultCrosshairPrefab; } else { orig.Invoke(self, characterBody, crosshairWorldPosition, uiCamera); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public void ScepterCompat() { } public override void ModifyPrefab() { ((CharacterBase)this).BodyPrefab.GetComponent(); } } [DisabledContent] public sealed class Borg : SurvivorBase { public override SurvivorDef SurvivorDef { get; } = SS2Assets.LoadAsset("SurvivorBorg", SS2Bundle.Indev); public override GameObject BodyPrefab { get; } = SS2Assets.LoadAsset("BorgBody", SS2Bundle.Indev); public override GameObject MasterPrefab { get; } public override void Hook() { } } public sealed class Chirr : SurvivorBase { public static Vector3 chirristmasPos = new Vector3(-6.8455f, -7.0516f, 57.0163f); public static Vector3 chirristmasRot = new Vector3(0f, 178.3926f, 0f); private static GameObject chirristmas; public override GameObject BodyPrefab { get; } = SS2Assets.LoadAsset("ChirrBody", SS2Bundle.Chirr); public override GameObject MasterPrefab { get; } = SS2Assets.LoadAsset("ChirrMonsterMaster", SS2Bundle.Chirr); public override SurvivorDef SurvivorDef { get; } = SS2Assets.LoadAsset("Chirr", SS2Bundle.Chirr); public override void Initialize() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown ((CharacterBase)this).Initialize(); if (Starstorm.ScepterInstalled) { ScepterCompat(); } DateTime today = DateTime.Today; if (today.Month == 12 && (today.Day == 27 || today.Day == 26 || today.Day == 25 || today.Day == 24 || today.Day == 23)) { BaseMainMenuScreen.OnEnter += new hook_OnEnter(HiChirrHiiiiii); } Stage.onStageStartGlobal += FixGoolakeRaycasts; } private void HiChirrHiiiiii(orig_OnEnter orig, BaseMainMenuScreen self, MainMenuController mainMenuController) { //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_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, mainMenuController); if (!Object.op_Implicit((Object)(object)chirristmas)) { chirristmas = Object.Instantiate(SS2Assets.LoadAsset("ChirrDisplay", SS2Bundle.Chirr), chirristmasPos, Quaternion.Euler(chirristmasRot)); chirristmas.transform.localScale = Vector3.one * 2.4f; } } private void FixGoolakeRaycasts(Stage stage) { //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_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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) BodyIndex bodyIndex = ((CharacterBase)this).BodyPrefab.GetComponent().bodyIndex; if (!((Object)(object)stage.sceneDef == (Object)(object)SceneCatalog.GetSceneDefFromSceneName("goolake"))) { return; } foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { if (instance.master.bodyPrefab.GetComponent().bodyIndex == bodyIndex) { GameObject val = GameObject.Find("HOLDER: GameplaySpace/Terrain"); if (Object.op_Implicit((Object)(object)val)) { SS2Log.Warning("Player Chirr found. Disabling terrain mesh optimization on goolake to avoid gameplay bugs."); MeshCollider component = val.GetComponent(); component.cookingOptions = (MeshColliderCookingOptions)(component.cookingOptions & -3); break; } } } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public void ScepterCompat() { ItemBase.instance.RegisterScepterSkill(SS2Assets.LoadAsset("BefriendScepter", SS2Bundle.Chirr), "ChirrBody", (SkillSlot)3, 0); } public override void ModifyPrefab() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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) CharacterBody component = ((CharacterBase)this).BodyPrefab.GetComponent(); component.preferredPodPrefab = Resources.Load("Prefabs/NetworkedObjects/SurvivorPod"); component._defaultCrosshairPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/UI/StandardCrosshair.prefab").WaitForCompletion(); ((Component)((Component)component).GetComponent().modelTransform).GetComponent().footstepDustPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/GenericFootstepDust.prefab").WaitForCompletion(); } } [DisabledContent] public sealed class Cyborg2 : SurvivorBase { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static GetDeployableSameSlotLimit <>9__15_0; public static GetDeployableSameSlotLimit <>9__15_1; public static GetDeployableSameSlotLimit <>9__15_2; internal int b__15_0(CharacterMaster self, int deployableCountMultiplier) { return maxTeleporters; } internal int b__15_1(CharacterMaster self, int deployableCountMultiplier) { return maxBloonTraps; } internal int b__15_2(CharacterMaster self, int deployableCountMultiplier) { return maxShockMines; } } public static int maxTeleporters = 1; public static int maxBloonTraps = 1; public static int maxShockMines = 6; public static DeployableSlot teleporter; public static DeployableSlot bloonTrap; public static DeployableSlot shockMine; public override GameObject BodyPrefab { get; } = SS2Assets.LoadAsset("Cyborg2Body", SS2Bundle.Indev); public override GameObject MasterPrefab { get; } = SS2Assets.LoadAsset("NemmandoMonsterMaster", SS2Bundle.NemCommando); public override SurvivorDef SurvivorDef { get; } = SS2Assets.LoadAsset("survivorCyborg2", SS2Bundle.Indev); public override void Initialize() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //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_0043: 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_004e: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_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_0077: Expected O, but got Unknown ((CharacterBase)this).Initialize(); object obj = <>c.<>9__15_0; if (obj == null) { GetDeployableSameSlotLimit val = (CharacterMaster self, int deployableCountMultiplier) => maxTeleporters; <>c.<>9__15_0 = val; obj = (object)val; } teleporter = DeployableAPI.RegisterDeployableSlot((GetDeployableSameSlotLimit)obj); object obj2 = <>c.<>9__15_1; if (obj2 == null) { GetDeployableSameSlotLimit val2 = (CharacterMaster self, int deployableCountMultiplier) => maxBloonTraps; <>c.<>9__15_1 = val2; obj2 = (object)val2; } bloonTrap = DeployableAPI.RegisterDeployableSlot((GetDeployableSameSlotLimit)obj2); object obj3 = <>c.<>9__15_2; if (obj3 == null) { GetDeployableSameSlotLimit val3 = (CharacterMaster self, int deployableCountMultiplier) => maxShockMines; <>c.<>9__15_2 = val3; obj3 = (object)val3; } shockMine = DeployableAPI.RegisterDeployableSlot((GetDeployableSameSlotLimit)obj3); SS2Assets.LoadAsset("CyborgBuffTeleporter", SS2Bundle.Indev).GetComponent().deployableSlot = teleporter; SS2Assets.LoadAsset("BloonTrap", SS2Bundle.Indev).GetComponent().deployableSlot = bloonTrap; SS2Assets.LoadAsset("ShockMine", SS2Bundle.Indev).GetComponent().deployableSlot = shockMine; _ = Starstorm.ScepterInstalled; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public void ScepterCompat() { } public override void ModifyPrefab() { //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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) CharacterBody component = ((CharacterBase)this).BodyPrefab.GetComponent(); component._defaultCrosshairPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/UI/StandardCrosshair.prefab").WaitForCompletion(); ((Component)((Component)component).GetComponent().modelTransform).GetComponent().footstepDustPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/GenericFootstepDust.prefab").WaitForCompletion(); } } [DisabledContent] public sealed class Executioner : SurvivorBase { private static List bodiesThatGiveSuperCharge = new List(); public override GameObject BodyPrefab { get; } = SS2Assets.LoadAsset("ExecutionerBody", SS2Bundle.Executioner); public override GameObject MasterPrefab { get; } = SS2Assets.LoadAsset("ExecutionerMonsterMasterNew", SS2Bundle.Executioner); public override SurvivorDef SurvivorDef { get; } = SS2Assets.LoadAsset("SurvivorExecutioner", SS2Bundle.Executioner); public static ReadOnlyCollection BodiesThatGiveSuperCharge { get; private set; } [SystemInitializer(new Type[] { typeof(BodyCatalog) })] private static void InitializeSuperchargeList() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Invalid comparison between Unknown and I4 //IL_0060: Unknown result type (might be due to invalid IL or missing references) foreach (string item in new List { "BrotherHurtBody", "ScavLunar1Body", "ScavLunar2Body", "ScavLunar3Body", "ScavLunar4Body", "ShopkeeperBody" }) { BodyIndex val = BodyCatalog.FindBodyIndexCaseInsensitive(item); if ((int)val != -1) { AddBodyToSuperchargeList(val); } } } public static void AddBodyToSuperchargeList(BodyIndex bodyIndex) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Invalid comparison between Unknown and I4 //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) if ((int)bodyIndex == -1) { SS2Log.Debug("Tried to add a body to the supercharge list, but it's index is none", 49, "AddBodyToSuperchargeList"); } else if (bodiesThatGiveSuperCharge.Contains(bodyIndex)) { GameObject bodyPrefab = BodyCatalog.GetBodyPrefab(bodyIndex); SS2Log.Debug($"Body prefab {bodyPrefab} is already in the list of bodies that give supercharge.", 56, "AddBodyToSuperchargeList"); } else { bodiesThatGiveSuperCharge.Add(bodyIndex); BodiesThatGiveSuperCharge = new ReadOnlyCollection(bodiesThatGiveSuperCharge); } } public override void ModifyPrefab() { ((CharacterBase)this).ModifyPrefab(); CharacterBody component = ((CharacterBase)this).BodyPrefab.GetComponent(); component.preferredPodPrefab = Resources.Load("Prefabs/NetworkedObjects/SurvivorPod"); component._defaultCrosshairPrefab = Resources.Load("Prefabs/Crosshair/StandardCrosshair"); } internal static int GetIonCountFromBody(CharacterBody body) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Invalid comparison between Unknown and I4 //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected I4, but got Unknown if ((Object)(object)body == (Object)null) { return 1; } if ((int)body.bodyIndex == -1) { return 1; } if (BodiesThatGiveSuperCharge.Contains(body.bodyIndex)) { return 100; } if (body.isChampion) { return 10; } HullClassification hullClassification = body.hullClassification; return (int)hullClassification switch { 0 => 1, 1 => 3, 2 => 5, _ => 1, }; } } public sealed class Executioner2 : SurvivorBase { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__21_2; public static Func <>9__21_3; public static Func <>9__21_4; public static Manipulator <>9__21_0; public static Func <>9__21_5; public static Func <>9__21_6; public static Manipulator <>9__21_1; internal void b__21_0(ILContext il) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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) bool flag = true; ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 53) }) && val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 8) })) { val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldloc, 53); val.EmitDelegate>((Func)delegate(HealthComponent self, float executeFraction) { if (self.body.HasBuff(SS2Content.Buffs.BuffFear)) { if (executeFraction < 0f) { executeFraction = 0f; } executeFraction += 0.15f; } return executeFraction; }); val.Emit(OpCodes.Stloc, 53); flag = false; } if (flag) { Debug.LogError((object)"Starstorm 2: Fear Execute IL Hook failed."); } } internal bool b__21_2(Instruction x) { return ILPatternMatchingExt.MatchStloc(x, 53); } internal bool b__21_3(Instruction x) { return ILPatternMatchingExt.MatchLdloc(x, 8); } internal float b__21_4(HealthComponent self, float executeFraction) { if (self.body.HasBuff(SS2Content.Buffs.BuffFear)) { if (executeFraction < 0f) { executeFraction = 0f; } executeFraction += 0.15f; } return executeFraction; } internal void b__21_1(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "Cripple") })) { val.Index += 2; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((bool hasBuff, CharacterBody self) => hasBuff || self.HasBuff(SS2Content.Buffs.BuffFear))); } else { Debug.LogError((object)"Starstorm 2: Fear VFX IL Hook failed."); } } internal bool b__21_5(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "Cripple"); } internal bool b__21_6(bool hasBuff, CharacterBody self) { if (!hasBuff) { return self.HasBuff(SS2Content.Buffs.BuffFear); } return true; } } private static List bodiesThatGiveSuperCharge = new List(); public override GameObject BodyPrefab { get; } = SS2Assets.LoadAsset("Executioner2Body", SS2Bundle.Executioner2); public override GameObject MasterPrefab { get; } = SS2Assets.LoadAsset("Executioner2Master", SS2Bundle.Executioner2); public override SurvivorDef SurvivorDef { get; } = SS2Assets.LoadAsset("SurvivorExecutioner2", SS2Bundle.Executioner2); public static ReadOnlyCollection BodiesThatGiveSuperCharge { get; private set; } [SystemInitializer(new Type[] { typeof(BodyCatalog) })] private static void InitializeSuperchargeList() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) foreach (string item in new List { "BrotherHurtBody", "ScavLunar1Body", "ScavLunar2Body", "ScavLunar3Body", "ScavLunar4Body", "ShopkeeperBody" }) { BodyCatalog.FindBodyIndexCaseInsensitive(item); _ = -1; } } public static void AddBodyToSuperchargeList(BodyIndex bodyIndex) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Invalid comparison between Unknown and I4 //IL_000a: 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_0012: Unknown result type (might be due to invalid IL or missing references) if ((int)bodyIndex != -1) { if (bodiesThatGiveSuperCharge.Contains(bodyIndex)) { BodyCatalog.GetBodyPrefab(bodyIndex); return; } bodiesThatGiveSuperCharge.Add(bodyIndex); BodiesThatGiveSuperCharge = new ReadOnlyCollection(bodiesThatGiveSuperCharge); } } public override void ModifyPrefab() { ((CharacterBase)this).ModifyPrefab(); CharacterBody component = ((CharacterBase)this).BodyPrefab.GetComponent(); component.preferredPodPrefab = Resources.Load("Prefabs/NetworkedObjects/SurvivorPod"); component._defaultCrosshairPrefab = Resources.Load("Prefabs/Crosshair/StandardCrosshair"); } public override void Hook() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown SetupFearExecute(); MapZone.TeleportBody += new hook_TeleportBody(MarkOOB); TeleportHelper.TeleportBody += new hook_TeleportBody(HelpOOB); } private void MarkOOB(orig_TeleportBody orig, MapZone self, CharacterBody characterBody) { ExecutionerController component = ((Component)characterBody).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.hasOOB = true; } orig.Invoke(self, characterBody); } private void HelpOOB(orig_TeleportBody orig, CharacterBody body, Vector3 targetFootPosition) { //IL_0041: 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_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_003d: Unknown result type (might be due to invalid IL or missing references) ExecutionerController component = ((Component)body).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component) && component.isExec) { component.hasOOB = true; targetFootPosition += new Vector3(0f, 1f, 0f); } orig.Invoke(body, targetFootPosition); } private HealthBarValues FearExecuteHealthbar(orig_GetHealthBarValues orig, HealthComponent self) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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) HealthBarValues result = orig.Invoke(self); if (!((Enum)self.body.bodyFlags).HasFlag((Enum)(object)(BodyFlags)16) && self.body.HasBuff(SS2Content.Buffs.BuffFear)) { result.cullFraction += 0.15f; } return result; } private void SetupFearExecute() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown HealthComponent.GetHealthBarValues += new hook_GetHealthBarValues(FearExecuteHealthbar); object obj = <>c.<>9__21_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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) bool flag = true; ILCursor val4 = new ILCursor(il); if (val4.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 53) }) && val4.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 8) })) { val4.Emit(OpCodes.Ldarg_0); val4.Emit(OpCodes.Ldloc, 53); val4.EmitDelegate>((Func)delegate(HealthComponent self, float executeFraction) { if (self.body.HasBuff(SS2Content.Buffs.BuffFear)) { if (executeFraction < 0f) { executeFraction = 0f; } executeFraction += 0.15f; } return executeFraction; }); val4.Emit(OpCodes.Stloc, 53); flag = false; } if (flag) { Debug.LogError((object)"Starstorm 2: Fear Execute IL Hook failed."); } }; <>c.<>9__21_0 = val; obj = (object)val; } HealthComponent.TakeDamage += (Manipulator)obj; object obj2 = <>c.<>9__21_1; if (obj2 == null) { Manipulator val2 = delegate(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) ILCursor val3 = new ILCursor(il); if (val3.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "Cripple") })) { val3.Index += 2; val3.Emit(OpCodes.Ldarg_0); val3.EmitDelegate>((Func)((bool hasBuff, CharacterBody self) => hasBuff || self.HasBuff(SS2Content.Buffs.BuffFear))); } else { Debug.LogError((object)"Starstorm 2: Fear VFX IL Hook failed."); } }; <>c.<>9__21_1 = val2; obj2 = (object)val2; } CharacterBody.UpdateAllTemporaryVisualEffects += (Manipulator)obj2; } internal static int GetIonCountFromBody(CharacterBody body) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Invalid comparison between Unknown and I4 //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected I4, but got Unknown if ((Object)(object)body == (Object)null) { return 1; } if ((int)body.bodyIndex == -1) { return 1; } if (BodiesThatGiveSuperCharge.Contains(body.bodyIndex)) { return 100; } if (body.isChampion) { return 10; } HullClassification hullClassification = body.hullClassification; return (int)hullClassification switch { 0 => 1, 1 => 3, 2 => 5, _ => 1, }; } } [DisabledContent] public sealed class Knight : SurvivorBase { public override GameObject BodyPrefab { get; } = SS2Assets.LoadAsset("KnightBody", SS2Bundle.Indev); public override GameObject MasterPrefab { get; } public override SurvivorDef SurvivorDef { get; } = SS2Assets.LoadAsset("survivorKnight", SS2Bundle.Indev); public override void Initialize() { ((CharacterBase)this).Initialize(); CharacterBody.onBodyStartGlobal += KnightBodyStart; } public override void ModifyPrefab() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) ((CharacterBase)this).BodyPrefab.GetComponent()._defaultCrosshairPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/UI/SimpleDotCrosshair.prefab").WaitForCompletion(); } private void KnightBodyStart(CharacterBody body) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) if (body.baseNameToken == "SS2_KNIGHT_BODY_NAME") { body.SetBuffCount(SS2Content.Buffs.bdFortified.buffIndex, 3); } } } [DisabledContent] public sealed class MULE : SurvivorBase { private GameObject projectilePrefab; public override GameObject BodyPrefab { get; } = SS2Assets.LoadAsset("MULEBody", SS2Bundle.Indev); public override GameObject MasterPrefab { get; } public override SurvivorDef SurvivorDef { get; } = SS2Assets.LoadAsset("survivorMULE", SS2Bundle.Indev); public override void ModifyPrefab() { //IL_0017: 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) ((CharacterBase)this).ModifyPrefab(); CharacterBody component = ((CharacterBase)this).BodyPrefab.GetComponent(); component.preferredPodPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Toolbot/RoboCratePod.prefab").WaitForCompletion(); component._defaultCrosshairPrefab = Resources.Load("Prefabs/Crosshair/StandardCrosshair"); } public void ModifyPrimaryProjectile() { } } [DisabledContent] public sealed class NemBandit : SurvivorBase { public override GameObject BodyPrefab { get; } = SS2Assets.LoadAsset("NemBanditBody", SS2Bundle.Indev); public override GameObject MasterPrefab { get; } = SS2Assets.LoadAsset("NemmandoMonsterMaster", SS2Bundle.Indev); public override SurvivorDef SurvivorDef { get; } = SS2Assets.LoadAsset("survivorNemBandit", SS2Bundle.Indev); public override void Initialize() { ((CharacterBase)this).Initialize(); _ = Starstorm.ScepterInstalled; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public void ScepterCompat() { } public override void ModifyPrefab() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) ((CharacterBase)this).BodyPrefab.GetComponent()._defaultCrosshairPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/UI/StandardCrosshair.prefab").WaitForCompletion(); } } [DisabledContent] public sealed class NemCaptain : SurvivorBase { public override GameObject BodyPrefab { get; } = SS2Assets.LoadAsset("NemCaptainBody", SS2Bundle.Indev); public override GameObject MasterPrefab { get; } = SS2Assets.LoadAsset("NemmandoMonsterMaster", SS2Bundle.Indev); public override SurvivorDef SurvivorDef { get; } = SS2Assets.LoadAsset("survivorNemCaptain", SS2Bundle.Indev); public override void Initialize() { ((CharacterBase)this).Initialize(); _ = Starstorm.ScepterInstalled; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public void ScepterCompat() { } public override void ModifyPrefab() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) ((CharacterBase)this).BodyPrefab.GetComponent()._defaultCrosshairPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/UI/StandardCrosshair.prefab").WaitForCompletion(); } } public sealed class NemCommando : SurvivorBase { private GameObject nemesisPod; private CharacterSelectController csc; public override GameObject BodyPrefab { get; } = SS2Assets.LoadAsset("NemCommandoBody", SS2Bundle.NemCommando); public override GameObject MasterPrefab { get; } = SS2Assets.LoadAsset("NemCommandoMonsterMaster", SS2Bundle.NemCommando); public override SurvivorDef SurvivorDef { get; } = SS2Assets.LoadAsset("survivorNemCommando", SS2Bundle.NemCommando); public override void Initialize() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown ((CharacterBase)this).Initialize(); if (Starstorm.ScepterInstalled) { ScepterCompat(); } CharacterSelectBarController.Awake += new hook_Awake(CharacterSelectBarController_Awake); } private void CharacterSelectBarController_Awake(orig_Awake orig, CharacterSelectBarController self) { //IL_000a: 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) SS2Content.Survivors.survivorNemMerc.hidden = !SurvivorCatalog.SurvivorIsUnlockedOnThisClient(SS2Content.Survivors.survivorNemMerc.survivorIndex); SS2Content.Survivors.survivorNemCommando.hidden = !SurvivorCatalog.SurvivorIsUnlockedOnThisClient(SS2Content.Survivors.survivorNemCommando.survivorIndex); orig.Invoke(self); } private void Destroy(GameObject gameObject) { Destroy(gameObject); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public void ScepterCompat() { ItemBase.instance.RegisterScepterSkill(SS2Assets.LoadAsset("NemmandoScepterSubmission", SS2Bundle.Nemmando), "NemmandoBody", (SkillSlot)3, 0); ItemBase.instance.RegisterScepterSkill(SS2Assets.LoadAsset("NemmandoScepterBossAttack", SS2Bundle.Nemmando), "NemmandoBody", (SkillSlot)3, 1); } public void CreateNemesisPod() { } } public class NemmandoPistolToken : MonoBehaviour { public int secondaryStocks = 8; } [DisabledContent] public sealed class NemExe : SurvivorBase { internal static Dictionary ionChargeValues = new Dictionary { { "MoffeinAncientWispBody", 10 }, { "BeetleGuardBody", 2 }, { "BeetleQueen2Body", 10 }, { "BellBody", 2 }, { "BisonBody", 2 }, { "BrotherBody", 10 }, { "BrotherGlassBody", 30 }, { "BrotherHurtBody", 100 }, { "ClayBossBody", 10 }, { "ClayBruiserBody", 2 }, { "ElectricWormBody", 20 }, { "GrandParentBody", 15 }, { "GravekeeperBody", 10 }, { "GreaterWispBody", 2 }, { "ImpBossBody", 10 }, { "LemurianBruiserBody", 3 }, { "LunarGolemBody", 3 }, { "LunarWispBody", 3 }, { "MagmaWormBody", 10 }, { "MiniMushroomBody", 2 }, { "NullifierBody", 2 }, { "ParentBody", 3 }, { "RoboBallBossBody", 10 }, { "ScavBody", 15 }, { "ScavLunar1Body", 100 }, { "ScavLunar2Body", 100 }, { "ScavLunar3Body", 100 }, { "ScavLunar4Body", 100 }, { "ShopkeeperBody", 300 }, { "SuperRoboBallBossBody", 50 }, { "TitanBody", 10 }, { "TitanGoldBody", 30 }, { "VagrantBody", 10 }, { "DireseekerBody", 10 }, { "DireseekerBossBody", 50 } }; public override GameObject BodyPrefab { get; } = SS2Assets.LoadAsset("NemExeBody", SS2Bundle.Nemmando); public override GameObject MasterPrefab { get; } = SS2Assets.LoadAsset("ExecutionerMonsterMaster", SS2Bundle.Nemmando); public override SurvivorDef SurvivorDef { get; } = SS2Assets.LoadAsset("survivorNemExe", SS2Bundle.Nemmando); internal static int GetIonCountFromBody(CharacterBody body) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Invalid comparison between Unknown and I4 //IL_0017: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)body == (Object)null) { return 1; } if ((int)body.bodyIndex == -1) { return 1; } string bodyName = BodyCatalog.GetBodyName(body.bodyIndex); if (bodyName == "" || bodyName == null) { return 1; } if (ionChargeValues.ContainsKey(bodyName)) { return ionChargeValues[bodyName]; } return 1; } } public sealed class NemMerc : SurvivorBase { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static GetDeployableSameSlotLimit <>9__13_0; public static GetDeployableSameSlotLimit <>9__13_1; internal int b__13_0(CharacterMaster self, int deployableCountMultiplier) { if (Object.op_Implicit((Object)(object)self.bodyInstanceObject)) { return self.bodyInstanceObject.GetComponent().special.maxStock; } return 1; } internal int b__13_1(CharacterMaster self, int deployableCountMultiplier) { return maxHolograms; } } public static int maxClones = 1; public static int maxHolograms = 10; public static DeployableSlot clone; public static DeployableSlot hologram; public override GameObject BodyPrefab { get; } = SS2Assets.LoadAsset("NemMercBody", SS2Bundle.NemMercenary); public override GameObject MasterPrefab { get; } = SS2Assets.LoadAsset("NemMercMonsterMaster", SS2Bundle.NemMercenary); public override SurvivorDef SurvivorDef { get; } = SS2Assets.LoadAsset("survivorNemMerc", SS2Bundle.NemMercenary); public override void Initialize() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //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_0043: 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_004e: Expected O, but got Unknown ((CharacterBase)this).Initialize(); object obj = <>c.<>9__13_0; if (obj == null) { GetDeployableSameSlotLimit val = (CharacterMaster self, int deployableCountMultiplier) => (!Object.op_Implicit((Object)(object)self.bodyInstanceObject)) ? 1 : self.bodyInstanceObject.GetComponent().special.maxStock; <>c.<>9__13_0 = val; obj = (object)val; } clone = DeployableAPI.RegisterDeployableSlot((GetDeployableSameSlotLimit)obj); object obj2 = <>c.<>9__13_1; if (obj2 == null) { GetDeployableSameSlotLimit val2 = (CharacterMaster self, int deployableCountMultiplier) => maxHolograms; <>c.<>9__13_1 = val2; obj2 = (object)val2; } hologram = DeployableAPI.RegisterDeployableSlot((GetDeployableSameSlotLimit)obj2); if (Starstorm.ScepterInstalled) { ScepterCompat(); } } public override void Hook() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown ((CharacterBase)this).Hook(); Target.GetBullseyePosition += new hook_GetBullseyePosition(HopefullyHarmlessAIFix); } private bool HopefullyHarmlessAIFix(orig_GetBullseyePosition orig, Target self, out Vector3 position) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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) if (!Object.op_Implicit((Object)(object)self.characterBody) && Object.op_Implicit((Object)(object)self.gameObject)) { self.lastKnownBullseyePosition = self.gameObject.transform.position; self.lastKnownBullseyePositionTime = FixedTimeStamp.now; } return orig.Invoke(self, ref position); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public void ScepterCompat() { ItemBase.instance.RegisterScepterSkill(SS2Assets.LoadAsset("NemMercScepterSpecial", SS2Bundle.NemMercenary), "NemMercBody", (SkillSlot)3, 0); ItemBase.instance.RegisterScepterSkill(SS2Assets.LoadAsset("NemMercScepterClone", SS2Bundle.NemMercenary), "NemMercBody", (SkillSlot)3, 1); } public override void ModifyPrefab() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) ((Component)((Component)((CharacterBase)this).BodyPrefab.GetComponent()).GetComponent().modelTransform).GetComponent().footstepDustPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/GenericFootstepDust.prefab").WaitForCompletion(); SS2Assets.LoadAsset("KnifeProjectile", SS2Bundle.NemMercenary).AddComponent().Add(RedirectHologram.damageType); PrefabAPI.RegisterNetworkPrefab(SS2Assets.LoadAsset("NemMercHologram", SS2Bundle.NemMercenary)); } } [DisabledContent] public sealed class Nemmando : SurvivorBase { public override GameObject BodyPrefab { get; } = SS2Assets.LoadAsset("NemmandoBody", SS2Bundle.Nemmando); public override GameObject MasterPrefab { get; } = SS2Assets.LoadAsset("NemmandoMonsterMaster", SS2Bundle.Nemmando); public override SurvivorDef SurvivorDef { get; } = SS2Assets.LoadAsset("SurvivorNemmando", SS2Bundle.Nemmando); private GameObject footstepDust { get; set; } = Resources.Load("Prefabs/GenericFootstepDust"); public override void Initialize() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown ((CharacterBase)this).Initialize(); if (Starstorm.ScepterInstalled) { ScepterCompat(); } CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(DisableGenesisLoopParticles); } private void DisableGenesisLoopParticles(orig_OnInventoryChanged orig, CharacterBody self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self.inventory) && self.inventory.GetItemCount(Items.NovaOnLowHealth) > 0) { NemmandoLoopToken component = ((Component)self).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { component = ((Component)self).gameObject.AddComponent(); component.DisableParticles(self); } else { component.DisableParticles(self); } } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public void ScepterCompat() { ItemBase.instance.RegisterScepterSkill(SS2Assets.LoadAsset("NemmandoScepterSubmission", SS2Bundle.Nemmando), "NemmandoBody", (SkillSlot)3, 0); ItemBase.instance.RegisterScepterSkill(SS2Assets.LoadAsset("NemmandoScepterBossAttack", SS2Bundle.Nemmando), "NemmandoBody", (SkillSlot)3, 1); } public override void ModifyPrefab() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) ((CharacterBase)this).BodyPrefab.GetComponent()._defaultCrosshairPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/UI/SimpleDotCrosshair.prefab").WaitForCompletion(); } } public class NemmandoLoopToken : MonoBehaviour { public void DisableParticles(CharacterBody self) { ((MonoBehaviour)this).StartCoroutine(DisableParticlesDelayed(self)); } private IEnumerator DisableParticlesDelayed(CharacterBody self) { yield return (object)new WaitForSeconds(1f); if (Object.op_Implicit((Object)(object)self)) { ChildLocator componentInChildren = ((Component)self).GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren) && Object.op_Implicit((Object)(object)componentInChildren.FindChild("ChargeSparks"))) { ((Component)componentInChildren.FindChild("ChargeSparks")).gameObject.SetActive(false); } } } } [DisabledContent] public sealed class Seraph : SurvivorBase { public override GameObject BodyPrefab { get; } = SS2Assets.LoadAsset("SeraphBody", SS2Bundle.Indev); public override GameObject MasterPrefab { get; } = SS2Assets.LoadAsset("NemmandoMonsterMaster", SS2Bundle.Indev); public override SurvivorDef SurvivorDef { get; } = SS2Assets.LoadAsset("survivorSeraph", SS2Bundle.Indev); public override void Initialize() { ((CharacterBase)this).Initialize(); } public override void ModifyPrefab() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) ((CharacterBase)this).BodyPrefab.GetComponent()._defaultCrosshairPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/UI/SimpleDotCrosshair.prefab").WaitForCompletion(); } } } namespace Moonstorm.Starstorm2.UI { [RequireComponent(typeof(HudElement))] [RequireComponent(typeof(RectTransform))] public class CustomCrosshairControllerUtils : MonoBehaviour { public RectTransform rectTransform { get; private set; } public HudElement hudElement { get; private set; } private void Awake() { rectTransform = ((Component)this).GetComponent(); hudElement = ((Component)this).GetComponent(); } } } namespace Moonstorm.Starstorm2.Components { [ExecuteAlways] public class BeamFromPoints : MonoBehaviour { public Transform endPoint; public Transform startPoint; public Transform[] transformsToScale; public Transform[] transformsToRotate; private void Update() { //IL_0006: 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_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //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_0042: 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) Vector3 forward = endPoint.position - startPoint.position; float magnitude = ((Vector3)(ref forward)).magnitude; Transform[] array = transformsToScale; foreach (Transform obj in array) { Vector3 localScale = obj.localScale; localScale.z = magnitude; obj.localScale = localScale; } array = transformsToRotate; for (int i = 0; i < array.Length; i++) { array[i].forward = forward; } } } public class BloonTrap : MonoBehaviour { public float moneyMultiplier; public int baseMaxMoney = 25; public EntityStateMachine machine; public float executeThreshold = 0.15f; public TetherVfxOrigin tetherVfxOrigin; public float radius = 14f; public float grantEliteBuffRadius = 64f; public float eliteBuffDuration = 30f; public string contextToken; public float maxDuration = 16f; private float stopwatch; private GameObject owner; private SphereSearch sphereSearch; private int maxMoney; private int currentMoney; private TeamFilter teamFilter; private List suckedBodies; private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown teamFilter = ((Component)this).GetComponent(); sphereSearch = new SphereSearch(); suckedBodies = new List(); maxMoney = Run.instance.GetDifficultyScaledCost(baseMaxMoney, Run.instance.difficultyCoefficient); } private void Start() { owner = ((Component)this).GetComponent().owner; } private void OnEnable() { GlobalEventManager.onCharacterDeathGlobal += TrySuckingDeath; } private void OnDisable() { GlobalEventManager.onCharacterDeathGlobal -= TrySuckingDeath; } private void TrySuckingDeath(DamageReport deathReport) { //IL_0006: 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_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)this).transform.position - deathReport.victimBody.footPosition; if (((Vector3)(ref val)).magnitude <= radius) { TrySuck(deathReport.victimBody); } } private void FixedUpdate() { stopwatch += Time.fixedDeltaTime; if (stopwatch >= maxDuration || IsFull()) { if (Object.op_Implicit((Object)(object)owner)) { owner.GetComponent().master.GiveMoney((uint)currentMoney); } Object.Destroy((Object)(object)((Component)this).gameObject); } List list = CollectionPool>.RentCollection(); SearchForTargets(list); int i = 0; for (int count = list.Count; i < count; i++) { TrySuck(list[i].healthComponent.body); } if (Object.op_Implicit((Object)(object)tetherVfxOrigin)) { List list2 = CollectionPool>.RentCollection(); int j = 0; for (int count2 = list.Count; j < count2; j++) { HurtBox val = list[j]; if (!Object.op_Implicit((Object)(object)val)) { continue; } Transform item = ((Component)val).transform; HealthComponent healthComponent = val.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent)) { Transform coreTransform = healthComponent.body.coreTransform; if (Object.op_Implicit((Object)(object)coreTransform)) { item = coreTransform; } } list2.Add(item); } tetherVfxOrigin.SetTetheredTransforms(list2); CollectionPool>.ReturnCollection(list2); } CollectionPool>.ReturnCollection(list); } private void SearchForTargets(List list) { //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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) sphereSearch.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; sphereSearch.origin = ((Component)this).transform.position; sphereSearch.radius = radius; sphereSearch.queryTriggerInteraction = (QueryTriggerInteraction)0; sphereSearch.RefreshCandidates(); sphereSearch.FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(teamFilter.teamIndex)); sphereSearch.OrderCandidatesByDistance(); sphereSearch.FilterCandidatesByDistinctHurtBoxEntities(); sphereSearch.GetHurtBoxes(list); sphereSearch.ClearCandidates(); } private void TrySuck(CharacterBody body) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Invalid comparison between Unknown and I4 if ((!body.healthComponent.alive || (body.bodyFlags & 0x10) <= 0) && !IsFull() && body.healthComponent.combinedHealthFraction <= executeThreshold && !suckedBodies.Contains(body)) { SUCK(body); suckedBodies.Add(body); } } public void SUCK(CharacterBody body) { //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Expected I4, but got Unknown //IL_01f1: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_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_0118: 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_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: 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_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_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Expected O, but got Unknown //IL_0154: Unknown result type (might be due to invalid IL or missing references) DeathRewards component = ((Component)body).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { currentMoney += Mathf.FloorToInt((float)component.goldReward * moneyMultiplier); } if (body.healthComponent.alive) { body.healthComponent.Suicide(owner, ((Component)this).gameObject, (DamageType)0); } if (Object.op_Implicit((Object)(object)body.modelLocator) && Object.op_Implicit((Object)(object)body.modelLocator.modelTransform)) { Object.Destroy((Object)(object)((Component)body.modelLocator.modelTransform).gameObject); } if (body.isElite) { GameObject val = SS2Assets.LoadAsset("RadialEliteBuffEffect", SS2Bundle.Indev); TeamMask val2 = default(TeamMask); ((TeamMask)(ref val2)).AddTeam(teamFilter.teamIndex); HurtBox[] hurtBoxes = new SphereSearch { mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, origin = ((Component)this).transform.position, radius = grantEliteBuffRadius }.RefreshCandidates().FilterCandidatesByHurtBoxTeam(val2).FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes(); Color val3 = Color.red; for (int i = 0; i < BuffCatalog.eliteBuffIndices.Length; i++) { BuffIndex val4 = BuffCatalog.eliteBuffIndices[i]; val3 = Color32.op_Implicit(BuffCatalog.GetBuffDef(val4).eliteDef.color); if (body.HasBuff(val4)) { HurtBox[] array = hurtBoxes; for (int j = 0; j < array.Length; j++) { array[j].healthComponent.body.AddTimedBuff(val4, eliteBuffDuration); } } } EffectData val5 = new EffectData { origin = ((Component)this).transform.position, scale = grantEliteBuffRadius, color = Color32.op_Implicit(val3) }; EffectManager.SpawnEffect(val, val5, true); } GameObject obj = SS2Assets.LoadAsset("SuckedOffOrbEffect", SS2Bundle.Indev); EffectData val6 = new EffectData { origin = body.corePosition, genericFloat = 1f, genericUInt = (uint)(body.bodyIndex + 1) }; val6.SetNetworkedObjectReference(((Component)this).gameObject); EffectManager.SpawnEffect(obj, val6, true); } public bool IsFull() { if (currentMoney < maxMoney) { return stopwatch >= maxDuration; } return true; } } public class ProjectileRemoteDetonator : MonoBehaviour { public class RemoteDetonatorOwnership : MonoBehaviour { public ProjectileRemoteDetonator projectile; private SkillDef detonateSkillDef; private CharacterBody body; private SkillLocator skillLocator; private void Awake() { body = ((Component)this).GetComponent(); detonateSkillDef = SS2Assets.LoadAsset("Cyborg2Detonate", SS2Bundle.Indev); if (Object.op_Implicit((Object)(object)body)) { skillLocator = body.skillLocator; skillLocator.special.SetSkillOverride((object)this, detonateSkillDef, (SkillOverridePriority)4); } } public void Detonate() { projectile.OnDetonate(); UnsetOverride(); } public void UnsetOverride() { if (Object.op_Implicit((Object)(object)skillLocator)) { skillLocator.special.UnsetSkillOverride((object)this, detonateSkillDef, (SkillOverridePriority)4); } Object.Destroy((Object)(object)this); } private void FixedUpdate() { if (!Object.op_Implicit((Object)(object)projectile)) { UnsetOverride(); } } } private ProjectileController controller; private ProjectileExplosion explosion; private GameObject owner; private RemoteDetonatorOwnership ownership; private void Start() { controller = ((Component)this).GetComponent(); owner = controller.owner; explosion = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)owner) && !Object.op_Implicit((Object)(object)ownership)) { ownership = owner.AddComponent(); ownership.projectile = this; } } public Vector3 GetSafeTeleportPosition() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) return ((Component)this).transform.position; } public void OnDetonate() { if (Object.op_Implicit((Object)(object)explosion)) { explosion.Detonate(); } } } [RequireComponent(typeof(EffectComponent))] public class SetMaterialColorFromEffectData : MonoBehaviour { public ParticleSystem[] particleSystems; public EffectComponent effectComponent; private void Start() { //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_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) Color val = Color32.op_Implicit(effectComponent.effectData.color); for (int i = 0; i < particleSystems.Length; i++) { ((Renderer)((Component)particleSystems[i]).GetComponent()).material.SetColor("_TintColor", val); particleSystems[i].Clear(); particleSystems[i].Play(); } } } [RequireComponent(typeof(EffectComponent))] public class SuckedOffOrbEffect : MonoBehaviour { public TrailRenderer trailToColor; public ParticleSystem[] particlesToColor; public SpriteRenderer[] spritesToColor; public RawImage image; private void Start() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005a: 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_0097: Unknown result type (might be due to invalid IL or missing references) CharacterBody component = BodyCatalog.GetBodyPrefab((BodyIndex)Util.UintToIntMinusOne(((Component)this).GetComponent().effectData.genericUInt)).GetComponent(); Color val = Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)8)); trailToColor.startColor *= val; trailToColor.endColor *= val; for (int i = 0; i < particlesToColor.Length; i++) { ParticleSystem obj = particlesToColor[i]; obj.startColor = val; obj.Play(); } for (int j = 0; j < spritesToColor.Length; j++) { spritesToColor[j].color = val; } image.texture = component.portraitIcon; } } public class TeleporterProjectile : MonoBehaviour { public class ProjectileTeleporterOwnership : MonoBehaviour { public TeleporterProjectile teleporter; private SkillDef teleportSkillDef; private CharacterBody body; private SkillLocator skillLocator; public static bool destroyOnFirstTeleport; private void Awake() { body = ((Component)this).GetComponent(); teleportSkillDef = SS2Assets.LoadAsset("Cyborg2Teleport", SS2Bundle.Indev); if (Object.op_Implicit((Object)(object)body)) { skillLocator = body.skillLocator; skillLocator.utility.SetSkillOverride((object)this, teleportSkillDef, (SkillOverridePriority)4); } } public void DoTeleport() { teleporter.OnTeleport(); if (destroyOnFirstTeleport) { UnsetOverride(); } } public void UnsetOverride() { if (Object.op_Implicit((Object)(object)skillLocator)) { skillLocator.utility.UnsetSkillOverride((object)this, teleportSkillDef, (SkillOverridePriority)4); } Object.Destroy((Object)(object)this); } private void FixedUpdate() { if (!Object.op_Implicit((Object)(object)teleporter)) { UnsetOverride(); } } } private ProjectileController controller; private GameObject owner; private ProjectileTeleporterOwnership ownership; private void Start() { controller = ((Component)this).GetComponent(); owner = controller.owner; if (Object.op_Implicit((Object)(object)owner) && !Object.op_Implicit((Object)(object)ownership)) { ownership = owner.AddComponent(); ownership.teleporter = this; } } public Vector3 GetSafeTeleportPosition() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) return ((Component)this).transform.position; } public void OnTeleport() { } } public class AimNoise : MonoBehaviour { public CameraRigController cameraRigController; public float intensity = 1f; public float loopTime = 10f; public float noiseStrength = 3f; private static int sampleCount = 256; public Vector2[] noiseSamples = (Vector2[])(object)new Vector2[sampleCount + 1]; private PitchYawPair velocity = PitchYawPair.zero; private float stopwatch; private int seed; private bool setToDestroy; private float destroyIntensity; private float destroyTimer; private float destroyDuration; private int sampleIndex => Mathf.FloorToInt((float)sampleCount * (stopwatch % loopTime / loopTime)); private float cameraMinPitch => cameraRigController.targetParams.cameraParams.data.minPitch.value; private float cameraMaxPitch => cameraRigController.targetParams.cameraParams.data.maxPitch.value; private void Awake() { seed = 500000; CalculateNoise(); } private void FixedUpdate() { stopwatch += Time.fixedDeltaTime; if (setToDestroy) { destroyTimer += Time.fixedDeltaTime; intensity = Mathf.Lerp(0f, destroyIntensity, destroyTimer / destroyDuration); if (destroyTimer >= destroyDuration) { Object.Destroy((Object)(object)this); } } } public void PolluteNoise() { } public void Update() { //IL_0017: 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_0027: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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_00a4: 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_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: 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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) Vector2 val = noiseSamples[Mathf.Clamp(sampleIndex, 0, sampleCount)]; float num = Mathf.Lerp(-10f, 10f, val.y) * intensity; float num2 = Mathf.Clamp(((Component)this).transform.eulerAngles.x + num, -70f, 70f); float num3 = val.x * 20f * intensity; float num4 = ((Component)this).transform.eulerAngles.y + num3; PitchYawPair val2 = new PitchYawPair(((Component)this).transform.eulerAngles.x, ((Component)this).transform.eulerAngles.y); PitchYawPair val3 = default(PitchYawPair); ((PitchYawPair)(ref val3))..ctor(num2, num4); PitchYawPair val4 = PitchYawPair.SmoothDamp(val2, val3, ref velocity, 0.3f, 5f * intensity); ((Component)this).transform.eulerAngles = new Vector3(val4.pitch, val4.yaw, ((Component)this).transform.eulerAngles.z); } private void CalculateNoise() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < sampleCount; i++) { float num = (float)(i * 2) * MathF.PI / (float)sampleCount; float num2 = Mathf.Cos(num) * noiseStrength; float num3 = Mathf.Sin(num) * noiseStrength; float num4 = Mathf.PerlinNoise(num2 + (float)seed, num3); float num5 = Mathf.PerlinNoise(num3 + (float)seed, num2); noiseSamples[i] = new Vector2(num4, num5); } } public void SetToDestroy(float duration) { setToDestroy = true; destroyDuration = duration; destroyIntensity = intensity; } public void OnDestroy() { RoR2Application.onUpdate -= PolluteNoise; } } [RequireComponent(typeof(Cloth))] public class AnimatedClothVelocity : MonoBehaviour { public float intensity; public bool includeWind; public AnimationCurve overallCurve; public AnimationCurve xAnimationCurve; public AnimationCurve yAnimationCurve; public AnimationCurve zAnimationCurve; public bool useOverallCurveOnly; private Cloth cloth; private float stopwatch; private void Awake() { cloth = ((Component)this).GetComponent(); } private void Update() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0122: 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) float num = overallCurve.Evaluate(stopwatch); Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(num, num, num); if (!useOverallCurveOnly) { float num2 = xAnimationCurve.Evaluate(stopwatch); float num3 = yAnimationCurve.Evaluate(stopwatch); float num4 = zAnimationCurve.Evaluate(stopwatch); val += new Vector3(num2, num3, num4); } cloth.externalAcceleration = val * intensity; if (includeWind && Object.op_Implicit((Object)(object)WindZoneController.instance)) { WindZone windZone = WindZoneController.instance.windZone; float windMain = windZone.windMain; windMain += Mathf.MoveTowards(windZone.windTurbulence, windZone.windTurbulence * Random.Range(0.3f, 1.5f), Random.Range(0.6f, 0.8f) * Time.deltaTime); if (stopwatch % windZone.windPulseFrequency <= 0.25f) { windMain += windZone.windPulseMagnitude; } Cloth obj = cloth; obj.externalAcceleration += ((Component)windZone).transform.forward * windMain; } stopwatch += Time.deltaTime; } } public class AnimationEligibilityEvaluator : MonoBehaviour { private Animator modelAnimator; private CharacterBody body; private HealthComponent healthComponent; private void Start() { modelAnimator = ((Component)((Component)this).gameObject.GetComponent().modelTransform).GetComponent(); body = ((Component)this).gameObject.GetComponent(); healthComponent = ((Component)this).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)modelAnimator) || !Object.op_Implicit((Object)(object)body)) { Debug.Log((object)"Animator and/or CharacterBody not provided to Animation Eligibility Evaluator. Destroying."); Object.Destroy((Object)(object)this); } } private void Update() { if (!Object.op_Implicit((Object)(object)modelAnimator) || !Object.op_Implicit((Object)(object)body)) { Object.Destroy((Object)(object)this); return; } modelAnimator.SetBool("outOfCombat", body.outOfCombat); modelAnimator.SetBool("outOfDanger", body.outOfDanger); modelAnimator.SetFloat("healthFraction", healthComponent.fullCombinedHealth); } } [RequireComponent(typeof(ObjectScaleCurve))] public class AuguryEffectController : MonoBehaviour { [Serializable] public class AugurySphere { public GameObject sphereObject; private Color OriginalColor { get; set; } private Vector3 OriginalScale { get; set; } public Color GetColor() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) return ((Renderer)sphereObject.GetComponent()).material.GetColor("_TintColor"); } public void SetColor(Color color) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) ((Renderer)sphereObject.GetComponent()).material.SetColor("_TintColor", color); } public void Awake() { //IL_0002: 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) OriginalColor = GetColor(); OriginalScale = sphereObject.transform.localScale; } public void RestoreDefault() { //IL_0002: 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) SetColor(OriginalColor); sphereObject.transform.localScale = OriginalScale; } } public ObjectScaleCurve explosionScaleCurve; public List spheres; public Vector3 scale; [HideInInspector] public bool fadeOut; private void Awake() { foreach (AugurySphere sphere in spheres) { sphere.Awake(); } } private void Update() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: 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) if (!fadeOut) { return; } Color color2 = default(Color); foreach (AugurySphere sphere in spheres) { Color color = sphere.GetColor(); float num = ((color.a - 0.5f * Time.deltaTime < 0f) ? 0f : (color.a - 0.5f * Time.deltaTime)); ((Color)(ref color2))..ctor(color.r, color.g, color.b, num); sphere.SetColor(color2); } if (AllSpheresFaded()) { fadeOut = false; } } private bool AllSpheresFaded() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) foreach (AugurySphere sphere in spheres) { if (!(sphere.GetColor().a <= 0f)) { return false; } } return true; } public void UpdateSize(Vector3 newScale) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_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_0039: 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_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) if (((Component)this).gameObject.transform.localScale.x < newScale.x) { ((Component)this).gameObject.transform.localScale = Vector3.Lerp(((Component)this).gameObject.transform.localScale, newScale, Mathf.Clamp01(newScale.x - ((Component)this).gameObject.transform.localScale.x) * Time.deltaTime); } else if (((Component)this).gameObject.transform.localScale.x > newScale.x) { ((Component)this).gameObject.transform.localScale = newScale; } } public void BeginScale(Vector3 scale, float duration) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) explosionScaleCurve.baseScale = scale; explosionScaleCurve.timeMax = duration; ((Behaviour)explosionScaleCurve).enabled = true; } public void RestoreDefaults() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) UpdateSize(Vector3.zero); foreach (AugurySphere sphere in spheres) { sphere.RestoreDefault(); } } } public class ChirrFriendOrb : GenericDamageOrb { public class ConvertBehavior : MonoBehaviour, IOnTakeDamageServerReceiver { public ChirrFriendTracker chirrFriendTracker; public CharacterBody body; public float convertHealthFraction = 0.5f; public float lifetime; private float stopwatch; private void Awake() { HealthComponent component = ((Component)this).GetComponent(); body = component.body; ref IOnTakeDamageServerReceiver[] onTakeDamageReceivers = ref component.onTakeDamageReceivers; IOnTakeDamageServerReceiver val = (IOnTakeDamageServerReceiver)(object)this; ArrayUtils.ArrayAppend(ref onTakeDamageReceivers, ref val); } private void FixedUpdate() { stopwatch += Time.fixedDeltaTime; if (stopwatch >= lifetime || !body.HasBuff(SS2Content.Buffs.BuffChirrConvert)) { Object.Destroy((Object)(object)this); } } public void OnTakeDamageServer(DamageReport damageReport) { if (Object.op_Implicit((Object)(object)damageReport.victimBody) && !damageReport.victimBody.isPlayerControlled && damageReport.victimBody.healthComponent.combinedHealthFraction < convertHealthFraction && Object.op_Implicit((Object)(object)chirrFriendTracker) && Object.op_Implicit((Object)(object)chirrFriendTracker.friendOwnership)) { chirrFriendTracker.friendOwnership.AddFriend(damageReport.victimMaster); SS2Log.Info("ChirrFriendOrb.OnArrival: added fren :)"); Object.Destroy((Object)(object)this); } } } private static GameObject penis = Addressables.LoadAssetAsync((object)"RoR2/Base/Croco/CrocoDiseaseOrbEffect.prefab").WaitForCompletion(); public ChirrFriendTracker tracker; public float buffDuration = 8f; public float convertHealthFraction = 0.5f; public override void Begin() { ((GenericDamageOrb)this).Begin(); } public override GameObject GetOrbEffect() { return penis; } public override void OnArrival() { //IL_00a7: Unknown result type (might be due to invalid IL or missing references) ((GenericDamageOrb)this).OnArrival(); if (Object.op_Implicit((Object)(object)((Orb)this).target) && Object.op_Implicit((Object)(object)tracker) && Object.op_Implicit((Object)(object)tracker.friendOwnership)) { ConvertBehavior convertBehavior = ((Component)((Orb)this).target.healthComponent).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)convertBehavior)) { convertBehavior = ((Component)((Orb)this).target.healthComponent).gameObject.AddComponent(); } convertBehavior.lifetime = buffDuration; convertBehavior.convertHealthFraction = convertHealthFraction; convertBehavior.chirrFriendTracker = tracker; DotController.InflictDot(((Component)((Orb)this).target.healthComponent).gameObject, base.attacker, ChirrConvert.dotIndex, buffDuration, 1f, (uint?)null); } } } public class ChirrFriendController : MonoBehaviour { public struct Friend { public CharacterMaster master; public TeamIndex teamIndex; public int[] itemStacks; public List itemAcquisitionOrder; public Friend(CharacterMaster master) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) this.master = master; teamIndex = master.teamIndex; itemStacks = ArrayUtils.Clone(this.master.inventory.itemStacks); itemAcquisitionOrder = this.master.inventory.itemAcquisitionOrder; } } private CharacterMaster master; public static float friendAimSpeedCoefficient = 3f; public Friend currentFriend; public static float healthDecayTime = 60f; private bool _isScepter; public bool isScepter { get { return _isScepter; } set { if (_isScepter != value) { _isScepter = value; UpdateScepter(); } } } public bool hasFriend => (Object)(object)currentFriend.master != (Object)null; public void Awake() { master = ((Component)this).GetComponent(); currentFriend = default(Friend); Inventory.onServerItemGiven += ShareNewItem; TeamComponent.onLeaveTeamGlobal += CheckFriendLeftTeam; } private void OnDestroy() { TeamComponent.onLeaveTeamGlobal -= CheckFriendLeftTeam; } private void UpdateScepter() { if (hasFriend) { CharacterMaster val = currentFriend.master; RemoveFriend(val); AddFriend(val); } } private void CheckFriendLeftTeam(TeamComponent teamComponent, TeamIndex teamIndex) { //IL_004c: 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) if (NetworkServer.active && hasFriend && ((Behaviour)teamComponent).enabled) { CharacterBody body = currentFriend.master.GetBody(); if (Object.op_Implicit((Object)(object)body) && (Object)(object)body == (Object)(object)teamComponent.body && body.healthComponent.alive && teamIndex == master.teamIndex) { RemoveFriend(currentFriend.master, useOldTeam: false); } } } public bool ItemFilter(ItemIndex itemIndex) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) bool num = Inventory.defaultItemCopyFilterDelegate(itemIndex); ItemDef itemDef = ItemCatalog.GetItemDef(itemIndex); if (num && itemDef.DoesNotContainTag((ItemTag)17) && itemDef.DoesNotContainTag((ItemTag)20) && itemDef.DoesNotContainTag((ItemTag)18)) { return !ItemIsScepter(itemDef); } return false; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private bool ItemIsScepter(ItemDef def) { if (!(((Object)def).name == "ITEM_ANCIENT_SCEPTER")) { return def.nameToken == "ITEM_ANCIENT_SCEPTER_NAME"; } return true; } private void ShareNewItem(Inventory inventory, ItemIndex itemIndex, int count) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)inventory == (Object)(object)master.inventory && Object.op_Implicit((Object)(object)currentFriend.master) && ItemFilter(itemIndex)) { currentFriend.master.inventory.GiveItem(itemIndex, count); } } private void FixedUpdate() { if (NetworkServer.active && Object.op_Implicit((Object)(object)master.GetBodyObject()) && master.IsDeadAndOutOfLivesServer() && hasFriend) { RemoveFriend(currentFriend.master); } } private void OnFriendDeath() { if (NetworkServer.active && Object.op_Implicit((Object)(object)currentFriend.master.GetBodyObject()) && currentFriend.master.IsDeadAndOutOfLivesServer()) { RemoveFriend(currentFriend.master); } } public void AddFriend([NotNull] CharacterMaster master) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Expected O, but got Unknown //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Invalid comparison between Unknown and I4 //IL_01a1: 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) if (!NetworkServer.active) { SS2Log.Warning("ChirrFriendTracker.AddFriend called on client."); return; } if (hasFriend) { RemoveFriend(currentFriend.master); } currentFriend = new Friend(master); CharacterBody body = master.GetBody(); FriendRewards(((Component)body).GetComponent()); TeamIndex val = (TeamIndex)((!Object.op_Implicit((Object)(object)body)) ? 2 : ((int)body.teamComponent.teamIndex)); TeamIndex teamIndex2 = (master.teamIndex = this.master.teamIndex); FriendManager.instance.CallRpcSetupFriend(((Component)master).gameObject, unfriend: false, isScepter); if (Object.op_Implicit((Object)(object)body)) { body.teamComponent.teamIndex = teamIndex2; Util.CleanseBody(body, true, false, false, true, true, false); body.AddTimedBuff(Buffs.HiddenInvincibility, 3f); } foreach (CombatSquad instances in InstanceTracker.GetInstancesList()) { if (Object.op_Implicit((Object)(object)instances) && instances.ContainsMember(master)) { instances.RemoveMember(master); if (instances.memberCount == 0 && !instances.defeatedServer) { instances.TriggerDefeat(); } } } master.minionOwnership.SetOwner(this.master); master.onBodyDeath.AddListener(new UnityAction(OnFriendDeath)); master.inventory.CopyItemsFrom(this.master.inventory, (Func)ItemFilter); master.inventory.GiveItem(SS2Content.Items.ChirrFriendHelper, 1); if (!isScepter) { master.inventory.GiveItem(Items.HealthDecay, (int)healthDecayTime); } if ((int)val == 4 && master.inventory.GetEquipmentIndex() == Equipment.EliteVoidEquipment.equipmentIndex) { master.inventory.SetEquipmentIndex((EquipmentIndex)(-1)); } } public void RemoveFriend([NotNull] CharacterMaster master) { if (!NetworkServer.active) { SS2Log.Warning("ChirrFriendTracker.RemoveFriend(CharacterMaster master) called on client."); } else { RemoveFriend(master, useOldTeam: true); } } public void RemoveFriend([NotNull] CharacterMaster master, bool useOldTeam) { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown if (!NetworkServer.active) { SS2Log.Warning("ChirrFriendTracker.RemoveFriend(CharacterMaster master, bool wasStolen) called on client."); return; } if ((Object)(object)currentFriend.master != (Object)null && (Object)(object)currentFriend.master != (Object)(object)master) { SS2Log.Warning(string.Concat("ChirrFriendTracker.RemoveFriend: ", master, " was not a friend")); return; } CharacterBody body = master.GetBody(); FriendManager.instance.CallRpcSetupFriend(((Component)master).gameObject, unfriend: true, isScepter); TeamIndex teamIndex = currentFriend.teamIndex; if (useOldTeam) { master.teamIndex = teamIndex; body.teamComponent.teamIndex = teamIndex; } if (Object.op_Implicit((Object)(object)body)) { SetStateOnHurt component = ((Component)body).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.SetStun(1f); } } master.minionOwnership.SetOwner(this.master); master.onBodyDeath.RemoveListener(new UnityAction(OnFriendDeath)); master.inventory.RemoveItem(SS2Content.Items.ChirrFriendHelper, 1); if (currentFriend.itemStacks != null && currentFriend.itemStacks.Length != 0) { Inventory inventory = master.inventory; inventory.itemAcquisitionOrder.Clear(); int[] itemStacks = inventory.itemStacks; int num = 0; ArrayUtils.SetAll(itemStacks, ref num); master.inventory.AddItemsFrom(currentFriend.itemStacks, (Func)((ItemIndex target) => true)); } currentFriend = default(Friend); } private void FriendRewards(DeathRewards deathRewards) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: 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_002e: Invalid comparison between Unknown and I4 //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_00be: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && Object.op_Implicit((Object)(object)deathRewards)) { Vector3 corePosition = deathRewards.characterBody.corePosition; uint num = deathRewards.goldReward; if ((int)Run.instance.selectedDifficulty >= 8) { num = (uint)((float)num * 0.8f); } TeamManager.instance.GiveTeamMoney(master.teamIndex, num); EffectManager.SpawnEffect(DeathRewards.coinEffectPrefab, new EffectData { origin = corePosition, genericFloat = deathRewards.goldReward, scale = deathRewards.characterBody.radius }, true); float num2 = 1f + (deathRewards.characterBody.level - 1f) * 0.3f; CharacterBody body = master.GetBody(); if (Object.op_Implicit((Object)(object)body)) { ExperienceManager.instance.AwardExperience(corePosition, body, (ulong)(uint)((float)deathRewards.expReward * num2)); } deathRewards.goldReward = 0u; deathRewards.expReward = 0u; } } private void OnEnable() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown GlobalEventManager.onClientDamageNotified += ShowHealthbarFromFriend; CombatHealthBarViewer.VictimIsValid += new hook_VictimIsValid(FriendIsValid); } private void OnDisable() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown CombatHealthBarViewer.VictimIsValid -= new hook_VictimIsValid(FriendIsValid); GlobalEventManager.onClientDamageNotified -= ShowHealthbarFromFriend; } private void ShowHealthbarFromFriend(DamageDealtMessage msg) { //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_0075: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)msg.victim) || msg.isSilent) { return; } TeamIndex objectTeam = TeamComponent.GetObjectTeam(msg.victim); foreach (CombatHealthBarViewer instances in CombatHealthBarViewer.instancesList) { if (hasFriend && (Object)(object)msg.attacker == (Object)(object)currentFriend.master.GetBodyObject() && Util.HasEffectiveAuthority(((Component)this).gameObject)) { instances.HandleDamage(msg.victim.GetComponent(), objectTeam); } } } private bool FriendIsValid(orig_VictimIsValid orig, CombatHealthBarViewer self, HealthComponent victim) { bool num = orig.Invoke(self, victim); bool flag = hasFriend && Object.op_Implicit((Object)(object)victim) && (Object)(object)((Component)victim).gameObject == (Object)(object)currentFriend.master.GetBodyObject(); return num || flag; } } [RequireComponent(typeof(InputBankTest))] [RequireComponent(typeof(CharacterBody))] [RequireComponent(typeof(TeamComponent))] public class ChirrFriendTracker : MonoBehaviour { public float maxTrackingDistance = 70f; public float maxTrackingAngle = 75f; public float trackerUpdateFrequency = 10f; [NonSerialized] public HurtBox trackingTarget; [NonSerialized] public CharacterBody characterBody; [NonSerialized] public TeamComponent teamComponent; [NonSerialized] public InputBankTest inputBank; [NonSerialized] public float trackerUpdateStopwatch; [NonSerialized] public Indicator indicator; [NonSerialized] public BullseyeSearch search = new BullseyeSearch(); private SkillLocator skillLocator; private bool _isScepter; private CharacterMaster master; public ChirrFriendController friendOwnership; public static float maximumFriendHealthFraction = 0.5f; public bool isScepter { get { return _isScepter; } set { if (_isScepter != value) { _isScepter = value; UpdateScepter(); } } } public void Awake() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown skillLocator = ((Component)this).GetComponent(); indicator = new Indicator(((Component)this).gameObject, SS2Assets.LoadAsset("ChirrBefriendIndicator", SS2Bundle.Chirr)); } public void Start() { characterBody = ((Component)this).GetComponent(); GameObject masterObject = characterBody.masterObject; if (Object.op_Implicit((Object)(object)masterObject)) { master = masterObject.GetComponent(); } if (Object.op_Implicit((Object)(object)master)) { friendOwnership = ((Component)master).GetComponent(); if (!Object.op_Implicit((Object)(object)friendOwnership)) { friendOwnership = ((Component)master).gameObject.AddComponent(); } friendOwnership.isScepter = isScepter; } inputBank = ((Component)this).GetComponent(); teamComponent = ((Component)this).GetComponent(); } private void UpdateScepter() { string name = (isScepter ? "ChirrBefriendScepterIndicator" : "ChirrBefriendIndicator"); indicator.visualizerPrefab = SS2Assets.LoadAsset(name, SS2Bundle.Chirr); if (Object.op_Implicit((Object)(object)friendOwnership)) { friendOwnership.isScepter = isScepter; } } private bool ShouldShowTracker() { if (Object.op_Implicit((Object)(object)skillLocator)) { return skillLocator.special.CanExecute(); } return false; } public bool ShouldSearchForFriend() { return Object.op_Implicit((Object)(object)friendOwnership); } public bool CheckBody(CharacterBody body) { bool flag = !body.isBoss; return true && flag; } public HurtBox GetTrackingTarget() { return trackingTarget; } public void OnEnable() { indicator.active = true; } public void OnDisable() { indicator.active = false; } public void FixedUpdate() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0068: 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 (!Util.HasEffectiveAuthority(((Component)this).gameObject)) { return; } trackerUpdateStopwatch += Time.fixedDeltaTime; if (trackerUpdateStopwatch >= 1f / trackerUpdateFrequency) { trackerUpdateStopwatch -= 1f / trackerUpdateFrequency; if (ShouldSearchForFriend()) { Ray aimRay = default(Ray); ((Ray)(ref aimRay))..ctor(inputBank.aimOrigin, inputBank.aimDirection); SearchForTarget(aimRay); indicator.targetTransform = ((Object.op_Implicit((Object)(object)trackingTarget) && ShouldShowTracker()) ? ((Component)trackingTarget).transform : null); } else { trackingTarget = null; } } } public virtual void SearchForTarget(Ray aimRay) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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_001f: 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_003d: 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_005b: Unknown result type (might be due to invalid IL or missing references) TeamMask allButNeutral = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral)).RemoveTeam(teamComponent.teamIndex); search.teamMaskFilter = allButNeutral; search.filterByLoS = true; search.searchOrigin = ((Ray)(ref aimRay)).origin; search.searchDirection = ((Ray)(ref aimRay)).direction; search.sortMode = (SortMode)2; search.maxDistanceFilter = maxTrackingDistance; search.maxAngleFilter = maxTrackingAngle; search.RefreshCandidates(); search.FilterOutGameObject(((Component)this).gameObject); HurtBox[] array = search.GetResults().ToArray(); foreach (HurtBox val in array) { if (Object.op_Implicit((Object)(object)val.healthComponent) && CheckBody(val.healthComponent.body)) { trackingTarget = val; return; } } trackingTarget = null; } } [RequireComponent(typeof(GrabController))] public class ChirrGrabBehavior : NetworkBehaviour { public static Dictionary bodyToGrabDuration; public static bool shouldLog; private GrabController grabController; private TeamComponent teamComponent; private CharacterBody body; public float buffLingerDuration = 5f; private static int kRpcRpcThrowVictim; private bool hasEffectiveAuthority => Util.HasEffectiveAuthority(((Component)this).gameObject); [SystemInitializer(new Type[] { typeof(BodyCatalog) })] private static void InitDictionary() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) BodyIndex key = BodyCatalog.FindBodyIndex("BrotherBody"); BodyIndex key2 = BodyCatalog.FindBodyIndex("BrotherHurtBody"); bodyToGrabDuration = new Dictionary(); bodyToGrabDuration.Add(key, 5f); bodyToGrabDuration.Add(key2, 5f); } private void Awake() { grabController = ((Component)this).GetComponent(); teamComponent = ((Component)this).GetComponent(); body = ((Component)this).GetComponent(); grabController.onVictimGrabbed += AddBuff; grabController.onVictimReleased += RemoveBuff; GrabController obj = grabController; obj.grabStateModifier = (GrabController.ModifyGrabStateDelegate)Delegate.Combine(obj.grabStateModifier, new GrabController.ModifyGrabStateDelegate(ModifyGrabState)); } private void ModifyGrabState(EntityStateMachine bodyMachine, ref EntityState grabState) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (grabState is GrabbedState grabbedState) { grabbedState.inflictor = grabController; grabbedState.duration = GetGrabDurationFromBody(((Component)bodyMachine).GetComponent().bodyIndex); } } private float GetGrabDurationFromBody(BodyIndex bodyIndex) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) if (!bodyToGrabDuration.TryGetValue(bodyIndex, out var value)) { return float.PositiveInfinity; } return value; } private void RemoveBuff(PassengerInfo info) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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) if (NetworkServer.active) { if (info.body.HasBuff(SS2Content.Buffs.BuffChirrGrabFriend)) { info.body.RemoveBuff(SS2Content.Buffs.BuffChirrGrabFriend); } if (Object.op_Implicit((Object)(object)info.body) && info.body.teamComponent.teamIndex == teamComponent.teamIndex) { info.body.AddTimedBuff(SS2Content.Buffs.BuffChirrGrabFriend, buffLingerDuration); } } } private void AddBuff(PassengerInfo info) { //IL_0000: 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_0018: 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_004e: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)info.body) && info.body.teamComponent.teamIndex == teamComponent.teamIndex) { if (Object.op_Implicit((Object)(object)body)) { body.outOfCombatStopwatch = 0f; } if (NetworkServer.active) { info.body.AddBuff(SS2Content.Buffs.BuffChirrGrabFriend); } } } [Server] public void ThrowVictim(GameObject victim, Vector3 velocity, float extraGravity, bool friendly) { //IL_004d: 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) if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void Moonstorm.Starstorm2.Components.ChirrGrabBehavior::ThrowVictim(UnityEngine.GameObject,UnityEngine.Vector3,System.Single,System.Boolean)' called on client"); } else if (Util.HasEffectiveAuthority(victim)) { if (shouldLog) { SS2Log.Info("ChirrGrabBehavior.ThrowVictim: victimInfo.hasEffectiveAuthority == true"); } ThrowVictimInternal(victim, velocity, extraGravity, friendly); } else { if (shouldLog) { SS2Log.Info("ChirrGrabBehavior.ThrowVictim: victimInfo.hasEffectiveAuthority == false"); } CallRpcThrowVictim(victim, velocity, extraGravity, friendly); } } [ClientRpc] private void RpcThrowVictim(GameObject victim, Vector3 velocity, float extraGravity, bool friendly) { //IL_000c: 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) if (shouldLog) { SS2Log.Info("ChirrGrabBehavior.RpcThrowVictim " + velocity); } if (Util.HasEffectiveAuthority(victim)) { if (shouldLog) { SS2Log.Info("ChirrGrabBehavior.RpcThrowVictim: victimInfo.hasEffectiveAuthority == true"); } ThrowVictimInternal(victim, velocity, extraGravity, friendly); } } private void ThrowVictimInternal(GameObject victim, Vector3 velocity, float extraGravity, bool friendly) { //IL_000c: 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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) if (shouldLog) { SS2Log.Info("ChirrGrabBehavior.ThrowVictimInternal " + velocity); } EntityStateMachine val = EntityStateMachine.FindByCustomName(victim, "Body"); if (Object.op_Implicit((Object)(object)val)) { EntityState state = val.state; BaseCharacterMain val2 = (BaseCharacterMain)(object)((state is BaseCharacterMain) ? state : null); if (val2 != null) { if (val2.hasRootMotionAccumulator) { val2.rootMotionAccumulator.accumulatedRootMotion = Vector3.zero; } if (val2.hasCharacterMotor) { ((EntityState)val2).characterMotor.rootMotion = Vector3.zero; } if (val2.hasRailMotor) { ((EntityState)val2).railMotor.rootMotion = Vector3.zero; } } val.SetInterruptState((EntityState)(object)new DroppedState { initialVelocity = velocity, inflictor = ((Component)this).gameObject, friendlyDrop = friendly, extraGravity = extraGravity }, (InterruptPriority)5); } else { ForceDetonateOnImpact forceDetonateOnImpact = victim.AddComponent(); forceDetonateOnImpact.initialVelocity = velocity; forceDetonateOnImpact.inflictor = ((Component)this).gameObject; } } private void UNetVersion() { } protected static void InvokeRpcRpcThrowVictim(NetworkBehaviour obj, NetworkReader reader) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) if (!NetworkClient.active) { Debug.LogError((object)"RPC RpcThrowVictim called on server."); } else { ((ChirrGrabBehavior)(object)obj).RpcThrowVictim(reader.ReadGameObject(), reader.ReadVector3(), reader.ReadSingle(), reader.ReadBoolean()); } } public void CallRpcThrowVictim(GameObject victim, Vector3 velocity, float extraGravity, bool friendly) { //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_0056: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { Debug.LogError((object)"RPC Function RpcThrowVictim called on client."); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)2); val.WritePackedUInt32((uint)kRpcRpcThrowVictim); val.Write(((Component)this).GetComponent().netId); val.Write(victim); val.Write(velocity); val.Write(extraGravity); val.Write(friendly); ((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcThrowVictim"); } static ChirrGrabBehavior() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown kRpcRpcThrowVictim = 191916598; NetworkBehaviour.RegisterRpcDelegate(typeof(ChirrGrabBehavior), kRpcRpcThrowVictim, new CmdDelegate(InvokeRpcRpcThrowVictim)); NetworkCRC.RegisterBehaviour("ChirrGrabBehavior", 0); } 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 ForceDetonateOnImpact : MonoBehaviour { public GameObject inflictor; public Vector3 initialVelocity; private CharacterBody characterBody; private bool bodyHadGravity; private bool bodyWasKinematic; private Rigidbody rigidbody; private bool tempRigidbody; private SphereCollider tempSphereCollider; private void Awake() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) characterBody = ((Component)this).GetComponent(); if (!Object.op_Implicit((Object)(object)characterBody)) { return; } GameObject bodyPrefab = BodyCatalog.GetBodyPrefab(characterBody.bodyIndex); if (Object.op_Implicit((Object)(object)bodyPrefab)) { Rigidbody component = bodyPrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { bodyHadGravity = component.useGravity; bodyWasKinematic = component.isKinematic; } } } private void Start() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) rigidbody = ((Component)this).GetComponent(); if (!Object.op_Implicit((Object)(object)rigidbody)) { rigidbody = ((Component)this).gameObject.AddComponent(); tempRigidbody = true; tempSphereCollider = ((Component)this).gameObject.AddComponent(); } rigidbody.velocity = initialVelocity; rigidbody.useGravity = true; rigidbody.isKinematic = false; } private void OnCollisionEnter(Collision collision) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005d: 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_0078: Expected O, but got Unknown //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_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: 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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012d: 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_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: 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_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: 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_0161: Unknown result type (might be due to invalid IL or missing references) if (collision.gameObject.layer != LayerIndex.world.intVal && collision.gameObject.layer != LayerIndex.entityPrecise.intVal) { return; } Util.PlaySound("ChirrThrowHitGround", ((Component)this).gameObject); if (NetworkServer.active) { EffectManager.SpawnEffect(DroppedState.hitGroundEffect, new EffectData { origin = characterBody.footPosition, scale = 1.25f }, true); if (Object.op_Implicit((Object)(object)inflictor)) { CharacterBody component = inflictor.GetComponent(); float num = (Object.op_Implicit((Object)(object)component) ? component.damage : 12f); new BlastAttack { position = characterBody.footPosition, baseDamage = AimDrop.damageCoefficient * num, baseForce = DroppedState.force, bonusForce = Vector3.up * DroppedState.bounceForce, radius = DroppedState.blastRadius, attacker = inflictor, inflictor = inflictor, teamIndex = component.teamComponent.teamIndex, crit = component.RollCrit(), procChainMask = default(ProcChainMask), procCoefficient = DroppedState.procCoefficient, falloffModel = (FalloffModel)1, damageColorIndex = (DamageColorIndex)0, damageType = (DamageType)32, attackerFiltering = (AttackerFiltering)0 }.Fire(); } } if (Object.op_Implicit((Object)(object)rigidbody)) { rigidbody.useGravity = bodyHadGravity; rigidbody.isKinematic = bodyWasKinematic; } if (tempRigidbody) { Object.Destroy((Object)(object)rigidbody); } if (Object.op_Implicit((Object)(object)tempSphereCollider)) { Object.Destroy((Object)(object)tempSphereCollider); } Object.Destroy((Object)(object)this); } } public class FriendManager : NetworkBehaviour { public static FriendManager instance; private static int kRpcRpcSetupFriend; [SystemInitializer(new Type[] { })] private static void Init() { Run.onRunStartGlobal += delegate(Run run) { instance = Object.Instantiate(SS2Assets.LoadAsset("FriendManager", SS2Bundle.Chirr), ((Component)run).transform).GetComponent(); NetworkServer.Spawn(((Component)instance).gameObject); }; } [ClientRpc] public void RpcSetupFriend(GameObject masterObject, bool unfriend, bool isScepter) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) CharacterMaster component = masterObject.GetComponent(); if (!unfriend) { if (isScepter) { Object.DontDestroyOnLoad((Object)(object)component); } return; } CharacterBody body = component.GetBody(); if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.teamComponent.indicator)) { Object.Destroy((Object)(object)body.teamComponent.indicator); } if (Object.op_Implicit((Object)(object)Stage.instance)) { SceneManager.MoveGameObjectToScene(((Component)component).gameObject, ((Component)Stage.instance).gameObject.scene); } } private void UNetVersion() { } protected static void InvokeRpcRpcSetupFriend(NetworkBehaviour obj, NetworkReader reader) { if (!NetworkClient.active) { Debug.LogError((object)"RPC RpcSetupFriend called on server."); } else { ((FriendManager)(object)obj).RpcSetupFriend(reader.ReadGameObject(), reader.ReadBoolean(), reader.ReadBoolean()); } } public void CallRpcSetupFriend(GameObject masterObject, bool unfriend, bool isScepter) { //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) if (!NetworkServer.active) { Debug.LogError((object)"RPC Function RpcSetupFriend called on client."); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)2); val.WritePackedUInt32((uint)kRpcRpcSetupFriend); val.Write(((Component)this).GetComponent().netId); val.Write(masterObject); val.Write(unfriend); val.Write(isScepter); ((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcSetupFriend"); } static FriendManager() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown kRpcRpcSetupFriend = 1435315478; NetworkBehaviour.RegisterRpcDelegate(typeof(FriendManager), kRpcRpcSetupFriend, new CmdDelegate(InvokeRpcRpcSetupFriend)); NetworkCRC.RegisterBehaviour("FriendManager", 0); } 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() { } } [RequireComponent(typeof(ProjectileController))] public class SpitBombZone : MonoBehaviour { public float startRadius = 7f; public float endRadius = 14f; public float fireFrequency = 3f; public float damageCoefficientPerSecond = 1f; public float procCoefficientPerSecond = 1f; public float lifetime = 5f; private float lifeStopwatch; private float fireStopwatch; private ProjectileController projectileController; private TeamFilter teamFilter; private ProjectileDamage projectileDamage; public Transform[] scaledTransforms; private float currentRadius; private void Awake() { projectileController = ((Component)this).GetComponent(); teamFilter = ((Component)this).GetComponent(); projectileDamage = ((Component)this).GetComponent(); currentRadius = startRadius; fireStopwatch = 1f / fireFrequency; } private bool ShouldGrantRegen(TeamIndex teamIndex) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) return teamFilter.teamIndex == teamIndex; } private bool ShouldConfuse(TeamIndex teamIndex) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) return teamFilter.teamIndex != teamIndex; } private void FixedUpdate() { //IL_0044: 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_005a: Unknown result type (might be due to invalid IL or missing references) lifeStopwatch += Time.fixedDeltaTime; currentRadius = Mathf.Lerp(startRadius, endRadius, lifeStopwatch / lifetime); Transform[] array = scaledTransforms; for (int i = 0; i < array.Length; i++) { array[i].localScale = Vector3.one * currentRadius / startRadius; } if (lifeStopwatch >= lifetime) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } fireStopwatch -= Time.fixedDeltaTime; if (fireStopwatch <= 0f) { fireStopwatch += 1f / fireFrequency; Fire(); } } private void Fire() { //IL_0119: 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_0131: 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_013b: 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_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: 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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: 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_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_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Expected O, but got Unknown //IL_0113: 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) if (!NetworkServer.active) { return; } if (Object.op_Implicit((Object)(object)projectileDamage)) { BlastAttack val = new BlastAttack { position = ((Component)this).transform.position, baseDamage = projectileDamage.damage * damageCoefficientPerSecond / fireFrequency, baseForce = 0f, radius = currentRadius, attacker = projectileController.owner, inflictor = ((Component)this).gameObject, teamIndex = projectileController.teamFilter.teamIndex, crit = projectileDamage.crit, procChainMask = projectileController.procChainMask, procCoefficient = projectileController.procCoefficient * procCoefficientPerSecond / fireFrequency, falloffModel = (FalloffModel)0, damageColorIndex = projectileDamage.damageColorIndex, damageType = projectileDamage.damageType, attackerFiltering = (AttackerFiltering)0 }; DamageAPI.AddModdedDamageType(val, ConfuseOnHit.confuseDamageType); val.Fire(); } SphereSearch val2 = new SphereSearch { radius = startRadius, origin = ((Component)this).transform.position, queryTriggerInteraction = (QueryTriggerInteraction)1, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask }; val2.RefreshCandidates(); val2.FilterCandidatesByDistinctHurtBoxEntities(); HurtBox[] hurtBoxes = val2.GetHurtBoxes(); for (int i = 0; i < hurtBoxes.Length; i++) { HealthComponent healthComponent = hurtBoxes[i].healthComponent; if (ShouldGrantRegen(healthComponent.body.teamComponent.teamIndex)) { healthComponent.body.AddTimedBuff(SS2Content.Buffs.BuffChirrRegen, 3f); } } } } public class CloneDroneCooldownComponent : MonoBehaviour { [SerializeField] public static Material defaultMat = SS2Assets.LoadAsset("matCloneDroneLight", SS2Bundle.Interactables); [SerializeField] public static Material disableMat = SS2Assets.LoadAsset("matCloneDroneNoLight", SS2Bundle.Interactables); private ModelLocator modelLocator; private GameObject model; private ChildLocator childLocator; private GameObject glowMesh; private MeshRenderer glowMeshRenderer; private CharacterModel charModel; private SkillLocator skillLoc; private bool hasSkill = true; private bool chargeMat; private float flickerDur = 4f; private float betweenFlicker = 0.25f; private float flickerStopwatch; private Coroutine flickerCoroutine; private AkEvent[] droneAkEvents; private void Awake() { //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) modelLocator = ((Component)this).GetComponent(); model = ((Component)modelLocator.modelTransform).gameObject; charModel = model.GetComponent(); skillLoc = ((Component)this).GetComponent(); GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Drones/Drone1Body.prefab").WaitForCompletion(); droneAkEvents = val.GetComponents(); AkEvent[] array = droneAkEvents; foreach (AkEvent val2 in array) { Type type = ((object)val2).GetType(); Component obj = ((Component)this).gameObject.AddComponent(type); FieldInfo[] fields = type.GetFields(); foreach (FieldInfo obj2 in fields) { object value = obj2.GetValue(val2); obj2.SetValue(obj, value); } } } private void FixedUpdate() { if (skillLoc.primary.stock < 1) { if (hasSkill) { hasSkill = false; } if (!(skillLoc.primary.cooldownRemaining <= flickerDur) || !(skillLoc.primary.cooldownRemaining > 0f)) { return; } flickerStopwatch += Time.fixedDeltaTime; if (!(flickerStopwatch >= betweenFlicker)) { return; } flickerStopwatch = 0f; if (Object.op_Implicit((Object)(object)charModel) && ((Object)(object)charModel.baseRendererInfos[2].defaultMaterial == (Object)(object)disableMat || (Object)(object)charModel.baseRendererInfos[2].defaultMaterial == (Object)(object)defaultMat)) { if ((Object)(object)charModel.baseRendererInfos[2].defaultMaterial == (Object)(object)disableMat) { charModel.baseRendererInfos[2].defaultMaterial = defaultMat; } else if ((Object)(object)charModel.baseRendererInfos[2].defaultMaterial == (Object)(object)defaultMat) { charModel.baseRendererInfos[2].defaultMaterial = disableMat; } } } else if (!hasSkill) { hasSkill = true; if (Object.op_Implicit((Object)(object)charModel)) { charModel.baseRendererInfos[2].defaultMaterial = defaultMat; } } } } public class CloneDroneItemMarker : MonoBehaviour { } public class CognationController : MonoBehaviour { private Material ghostMaterial = SS2Assets.LoadAsset("matCognation", SS2Bundle.Artifacts); private CharacterBody originalBody; private CharacterMaster originalMaster; private DeathRewards originalRewards; private CharacterBody thisBody; private CharacterMaster thisMaster; private CharacterModel thisModel; private DeathRewards thisRewards; internal void SetOriginals(CharacterBody origBody, CharacterMaster origMaster, DeathRewards origRewards) { originalBody = origBody; originalMaster = origMaster; originalRewards = origRewards; } private void Start() { if (!PopulateFields()) { SS2Log.Error("Could not find one of the fields for cognation ghost.", 30, "Start"); Object.Destroy((Object)(object)this); } else { ModifyStats(); AddRewards(); ModifyCharacterModel(); } } private bool PopulateFields() { thisBody = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)thisBody)) { thisMaster = thisBody.master; } thisRewards = ((Component)this).GetComponent(); ModelLocator component = ((Component)thisBody).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Transform modelTransform = component.modelTransform; if (Object.op_Implicit((Object)(object)modelTransform)) { thisModel = ((Component)modelTransform).GetComponent(); } } if (Object.op_Implicit((Object)(object)thisBody) && Object.op_Implicit((Object)(object)thisMaster) && Object.op_Implicit((Object)(object)thisRewards)) { return Object.op_Implicit((Object)(object)thisModel); } return false; } private void ModifyStats() { CharacterBody obj = thisBody; obj.baseMaxHealth *= 3f; CharacterBody obj2 = thisBody; obj2.baseMoveSpeed *= 1.25f; CharacterBody obj3 = thisBody; obj3.baseAttackSpeed *= 1.25f; CharacterBody obj4 = thisBody; obj4.baseDamage *= 0.9f; CharacterBody obj5 = thisBody; obj5.baseArmor -= 25f; thisBody.PerformAutoCalculateLevelStats(); thisBody.RecalculateStats(); } private void AddRewards() { thisRewards.goldReward = (uint)((float)originalRewards.goldReward / 1.5f); thisRewards.expReward = (uint)((float)originalRewards.expReward / 1.5f); } private void ModifyCharacterModel() { for (int i = 0; i < thisModel.baseRendererInfos.Length; i++) { Material defaultMaterial = thisModel.baseRendererInfos[i].defaultMaterial; if (((Object)defaultMaterial.shader).name.StartsWith("Hopoo Games/Deferred")) { defaultMaterial = ghostMaterial; thisModel.baseRendererInfos[i].defaultMaterial = defaultMaterial; } } } internal void SetModelDestroyOnUnseen() { DestroyOnUnseen val = ((Component)thisModel).GetComponent(); if (!Object.op_Implicit((Object)(object)val)) { val = ((Component)thisModel).gameObject.AddComponent(); } val.cull = true; } } public class ColliderBasedOffset : MonoBehaviour { [Tooltip("-1 to 1 offset. 1 = top of bounds, -1 = bottom of bounds.")] public Vector3 normalizedOffset; private Transform parentTransform; private Collider bodyCollider; private void Start() { parentTransform = ((Component)this).transform.parent; bodyCollider = ((Component)((Component)this).transform.parent).GetComponent(); } private void Update() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0045: 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_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) Vector3 val = parentTransform.position; Bounds bounds; if (Object.op_Implicit((Object)(object)bodyCollider)) { bounds = bodyCollider.bounds; val = ((Bounds)(ref bounds)).center; } Transform transform = ((Component)this).transform; Vector3 val2 = val; float x = normalizedOffset.x; bounds = bodyCollider.bounds; float num = x * ((Bounds)(ref bounds)).extents.x; float y = normalizedOffset.y; bounds = bodyCollider.bounds; float num2 = y * ((Bounds)(ref bounds)).extents.y; float z = normalizedOffset.z; bounds = bodyCollider.bounds; transform.position = val2 + new Vector3(num, num2, z * ((Bounds)(ref bounds)).extents.z); } } public class DisableCollisionsForDuration : MonoBehaviour { public Collider[] collidersSelf; public Collider[] collidersOther; public float timer; public bool disableSelfColliders; private void Start() { Collider[] array = collidersSelf; foreach (Collider val in array) { Collider[] array2 = collidersOther; foreach (Collider val2 in array2) { if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val2)) { Physics.IgnoreCollision(val, val2, true); } } if (Object.op_Implicit((Object)(object)val)) { val.enabled = !disableSelfColliders; } } } private void FixedUpdate() { timer -= Time.fixedDeltaTime; if (!(timer <= 0f)) { return; } Collider[] array = collidersSelf; foreach (Collider val in array) { Collider[] array2 = collidersOther; foreach (Collider val2 in array2) { if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val2)) { Physics.IgnoreCollision(val, val2, false); } } if (Object.op_Implicit((Object)(object)val)) { val.enabled = true; } } Object.Destroy((Object)(object)this); } } public sealed class DropPodController : NetworkBehaviour, IInteractable, IDisplayNameProvider { public enum RewardType { Item = 1, Enemy, Corpse, Nothing } public string contextToken = "SS2_INTERACTABLE_DROPPOD_CONTEXT"; public string displayNameToken = "SS2_INTERACTABLE_DROPPOD_NAME"; public TeamIndex activatorEnemyTeamIndex; internal static DirectorCard[] currentStageMonsters; private PickupIndex[] currentStageWhites; private Xoroshiro128Plus rng; [SyncVar] private bool opened; private WeightedSelection rewardSelection = new WeightedSelection(8); public bool NetworkOpened { get { return opened; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref opened, 1u); } } public bool Networkopened { get { return opened; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref opened, 1u); } } public void OnEnable() { InstanceTracker.Add(this); } public void OnDisable() { InstanceTracker.Remove(this); } private void Start() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)Run.instance)) { rng = new Xoroshiro128Plus(Run.instance.runRNG.nextUlong); currentStageWhites = Run.instance.availableTier1DropList.ToArray(); rewardSelection.AddChoice(RewardType.Item, 0.2f); rewardSelection.AddChoice(RewardType.Enemy, 0.5f); rewardSelection.AddChoice(RewardType.Corpse, 0.1f); } } public string GetContextString([NotNull] Interactor activator) { return Language.GetString(contextToken); } public string GetDisplayName() { return Language.GetString(displayNameToken); } public Interactability GetInteractability([NotNull] Interactor activator) { if (!opened) { return (Interactability)2; } return (Interactability)0; } [Server] public void OnInteractionBegin([NotNull] Interactor activator) { if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void Moonstorm.Starstorm2.Components.DropPodController::OnInteractionBegin(RoR2.Interactor)' called on client"); } else if (!opened) { NetworkOpened = true; EntityStateMachine component = ((Component)this).GetComponent(); CharacterBody component2 = ((Component)activator).GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component2)) { component.SetNextState((EntityState)(object)new PreRelease()); } } } public bool ShouldIgnoreSpherecastForInteractibility([NotNull] Interactor activator) { return false; } public bool ShouldShowOnScanner() { return !opened; } public override int GetNetworkChannel() { return QosChannelIndex.defaultReliable.intVal; } [Server] public RewardType GetRewardType() { if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'Moonstorm.Starstorm2.Components.DropPodController/RewardType Moonstorm.Starstorm2.Components.DropPodController::GetRewardType()' called on client"); return default(RewardType); } return rewardSelection.Evaluate(rng.nextNormalizedFloat); } [Server] public void SpawnItem(Transform exitSpot) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void Moonstorm.Starstorm2.Components.DropPodController::SpawnItem(UnityEngine.Transform)' called on client"); } else { PickupDropletController.CreatePickupDroplet(currentStageWhites[rng.RangeInt(0, currentStageWhites.Length)], exitSpot.position, Vector3.up * 3f); } } [Server] public void SpawnEnemy(Transform exitSpot) { //IL_004d: 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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void Moonstorm.Starstorm2.Components.DropPodController::SpawnEnemy(UnityEngine.Transform)' called on client"); return; } DirectorCard dCard = currentStageMonsters[rng.RangeInt(0, currentStageMonsters.Length)]; if (dCard == null) { return; } DirectorSpawnRequest val = new DirectorSpawnRequest(dCard.spawnCard, new DirectorPlacementRule { placementMode = (PlacementMode)0, minDistance = 3f, maxDistance = 20f, spawnOnTarget = exitSpot }, RoR2Application.rng); val.teamIndexOverride = (TeamIndex)2; val.onSpawnedServer = (Action)Delegate.Combine(val.onSpawnedServer, (Action)delegate(SpawnResult spawnResult) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) CharacterBody body = spawnResult.spawnedInstance.GetComponent().GetBody(); if (Object.op_Implicit((Object)(object)body)) { DeathRewards component = ((Component)body).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.expReward = (uint)((float)dCard.cost * 0.2f * Run.instance.compensatedDifficultyCoefficient); component.goldReward = (uint)((double)dCard.cost * 0.2 * 2.0 * (double)Run.instance.compensatedDifficultyCoefficient); } } }); DirectorCore instance = DirectorCore.instance; if (instance != null) { instance.TrySpawnObject(val); } } [Server] public void SpawnCorpse(Transform exitSpot) { if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void Moonstorm.Starstorm2.Components.DropPodController::SpawnCorpse(UnityEngine.Transform)' called on client"); return; } GameObject obj = Object.Instantiate(SurvivorCatalog.survivorDefs[rng.RangeInt(0, SurvivorCatalog.survivorDefs.Length)].bodyPrefab, exitSpot); HealthComponent component = obj.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.Suicide((GameObject)null, (GameObject)null, (DamageType)0); } NetworkServer.Spawn(obj); } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.Write(opened); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & (true ? 1u : 0u)) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(opened); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { if (initialState) { opened = reader.ReadBoolean(); return; } int num = (int)reader.ReadPackedUInt32(); if (((uint)num & (true ? 1u : 0u)) != 0) { opened = reader.ReadBoolean(); } } public override void PreStartClient() { } } public class EnableRandomOnStart : MonoBehaviour { public Transform[] transforms; private void Start() { int num = Mathf.FloorToInt((float)Random.Range(0, transforms.Length - 1)); ((Component)transforms[num]).gameObject.SetActive(true); } } public class AddRotationByDifficulty : MonoBehaviour { public bool localRotationOnly = true; public Vector3 rotationPerDifficultyIncrease; public Vector3 transformOffsetPerDifficultyIncrease; private const float maxScaling = 3.5f; private void Start() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_0124: 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_012a: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)Run.instance)) { Vector3 val = rotationPerDifficultyIncrease * (Mathf.Clamp(DifficultyCatalog.GetDifficultyDef(Run.instance.selectedDifficulty).scalingValue, 1f, 3.5f) - 1f); Vector3 position = default(Vector3); ((Vector3)(ref position))..ctor(transformOffsetPerDifficultyIncrease.x * (Mathf.Clamp(DifficultyCatalog.GetDifficultyDef(Run.instance.selectedDifficulty).scalingValue, 1f, 3.5f) - 1f) * 33f, transformOffsetPerDifficultyIncrease.y * (Mathf.Clamp(DifficultyCatalog.GetDifficultyDef(Run.instance.selectedDifficulty).scalingValue, 1f, 3.5f) - 1f) + 300f, transformOffsetPerDifficultyIncrease.z * (Mathf.Clamp(DifficultyCatalog.GetDifficultyDef(Run.instance.selectedDifficulty).scalingValue, 1f, 3.5f) - 1f) * -8.33f); if (localRotationOnly) { Transform transform = ((Component)this).transform; transform.localEulerAngles += val; } else { Transform transform2 = ((Component)this).transform; transform2.eulerAngles += val; } ((Component)this).transform.position = position; } } } public class AnimateWeatherControllerToInitial : MonoBehaviour { public float timeToLerp; private float LerpWhenStarted; private float stopwatch; private float expectedLerp; private bool isDestroying; private WeatherParams cachedParams; private void Awake() { if (!Object.op_Implicit((Object)(object)SceneWeatherController.instance) || SceneWeatherController.instance.weatherLerp == 0f) { Object.Destroy((Object)(object)this); return; } LerpWhenStarted = SceneWeatherController.instance.weatherLerp; expectedLerp = LerpWhenStarted; } private void Update() { //IL_0097: 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) stopwatch += Time.deltaTime; if (!Object.op_Implicit((Object)(object)SceneWeatherController.instance)) { Object.Destroy((Object)(object)this); isDestroying = true; return; } if (expectedLerp != SceneWeatherController.instance.weatherLerp) { expectedLerp = -1f; return; } _ = stopwatch / timeToLerp; expectedLerp = Mathf.Lerp(LerpWhenStarted, 0f, stopwatch / timeToLerp); SceneWeatherController.instance.weatherLerp = expectedLerp; cachedParams = SceneWeatherController.instance.GetWeatherParams(expectedLerp); if (timeToLerp - stopwatch <= 0f) { Object.Destroy((Object)(object)this); isDestroying = true; } } private void LateUpdate() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) if (!isDestroying && expectedLerp != SceneWeatherController.instance.weatherLerp) { SceneWeatherController.instance.initialWeatherParams = cachedParams; SceneWeatherController.instance.Update(); Object.Destroy((Object)(object)this); } } } [RequireComponent(typeof(ParticleSystem))] public class EventParticleSystemScaler : MonoBehaviour { [Tooltip("Based off the difficulty scaling value of the DifficultyDef.")] public float particlesPerDifficultyIncrease; [Tooltip("How much the speed of the particle increases per difficulty increase.")] public float particleSpeedPerDifficultyIncrease; [Tooltip("How much the speed of the particle increases per difficulty increase.")] public float simulationSpeedPerDifficultyIncrease; public static float difficultyScaleCap = 3.5f; private ParticleSystem particleSystem; private MainModule particleMain; private void Awake() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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) if (Object.op_Implicit((Object)(object)Run.instance)) { particleSystem = ((Component)this).GetComponent(); particleMain = particleSystem.main; float num = Mathf.Clamp(DifficultyCatalog.GetDifficultyDef(Run.instance.selectedDifficulty).scalingValue - 1f, 0f, difficultyScaleCap - 1f); if (particleSpeedPerDifficultyIncrease != 0f) { ref MainModule reference = ref particleMain; ((MainModule)(ref reference)).startSpeedMultiplier = ((MainModule)(ref reference)).startSpeedMultiplier + particleSpeedPerDifficultyIncrease * num; } if (particlesPerDifficultyIncrease != 0f) { EmissionModule emission = particleSystem.emission; ((EmissionModule)(ref emission)).rateOverTimeMultiplier = ((EmissionModule)(ref emission)).rateOverTimeMultiplier + particlesPerDifficultyIncrease * num; } if (simulationSpeedPerDifficultyIncrease != 0f) { ref MainModule reference2 = ref particleMain; ((MainModule)(ref reference2)).simulationSpeed = ((MainModule)(ref reference2)).simulationSpeed + simulationSpeedPerDifficultyIncrease * num; } } Object.Destroy((Object)(object)this); } } public class EventStateEffect : MonoBehaviour { [Serializable] public class EventStateEvent : UnityEvent { } [HideInInspector] public float intensityMultiplier = 1f; private bool isEnding; private float endingDuration; private float endingTimer; [Space] [Tooltip("Actions to be called when the warning starts")] public EventStateEvent onEffectStart = new EventStateEvent(); public EventStateEvent onEndingStart = new EventStateEvent(); public EventStateEvent onDestroyEffect = new EventStateEvent(); public void OnEffectStart() { ((UnityEvent)onEffectStart).Invoke(intensityMultiplier); } public void OnEndingStart(float endingDuration) { ((UnityEvent)onEndingStart).Invoke(endingDuration); this.endingDuration = endingDuration; isEnding = true; } private void FixedUpdate() { if (isEnding) { endingTimer += Time.fixedDeltaTime; if (endingTimer >= endingDuration) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } } public class LerpParticleSystemEmission : MonoBehaviour { public ParticleSystem particleSystem; public float duration = 3f; public AnimationCurve lerp; private EmissionModule emission; private float stopwatch; private float initialEmission; private void Start() { //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) emission = particleSystem.emission; initialEmission = ((EmissionModule)(ref emission)).rateOverTimeMultiplier; } public void FixedUpdate() { ((EmissionModule)(ref emission)).rateOverTimeMultiplier = initialEmission * lerp.Evaluate(stopwatch / duration); stopwatch += Time.fixedDeltaTime; if (stopwatch >= initialEmission) { ((Behaviour)this).enabled = false; } } } public class LerpPostProcessingWeight : MonoBehaviour { public PostProcessVolume postProcessVolume; public float endWeight; public float duration; [HideInInspector] public PostProcessProfile postProcessProfile; private float stopwatch; private float startWeight; private void Start() { startWeight = postProcessVolume.weight; postProcessProfile = postProcessVolume.profile; if (!postProcessVolume.HasInstantiatedProfile()) { SS2Log.Error($"{postProcessVolume} has no instantiated profile. returning.", 24, "Start"); } } private void FixedUpdate() { postProcessVolume.weight = Mathf.Lerp(startWeight, endWeight, stopwatch / duration); if (stopwatch > duration) { ((Behaviour)this).enabled = false; } stopwatch += Time.fixedDeltaTime; } } public class LerpRainIntensity : MonoBehaviour { public PostProcessVolume postProcessVolume; public float endIntensity; public float duration; private FloatParameter rainIntensity; private float stopwatch; private float startIntensity; private void Awake() { rainIntensity = postProcessVolume.profile.GetSetting().rainIntensity; } private void Start() { startIntensity = ParameterOverride.op_Implicit((ParameterOverride)(object)rainIntensity); } private void FixedUpdate() { ((ParameterOverride)(object)rainIntensity).Interp(startIntensity, endIntensity, Mathf.Clamp01(stopwatch / duration)); stopwatch += Time.fixedDeltaTime; if (stopwatch > duration) { ((Behaviour)this).enabled = false; } } } public class RotateToWind : MonoBehaviour { [Tooltip("Whether the tool keeps tracking to the wind vector")] public bool trackAfterStart = true; [Tooltip("Rotation speed in degrees of the object after initialization")] public float rotationSpeed = 30f; private float maxRotation => Time.deltaTime * rotationSpeed; private void Start() { //IL_0028: 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) if (!Object.op_Implicit((Object)(object)WindZoneController.instance)) { Object.Destroy((Object)(object)this); return; } ((Component)this).transform.rotation = Util.QuaternionSafeLookRotation(((Component)WindZoneController.instance.windZone).transform.forward, Vector3.up); if (!trackAfterStart) { Object.Destroy((Object)(object)this); } } private void FixedUpdate() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: 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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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) float num = Vector2.SignedAngle(Vector2.op_Implicit(((Component)this).transform.eulerAngles), Vector2.op_Implicit(((Component)WindZoneController.instance.windZone).transform.eulerAngles)); if (Mathf.Approximately(0f, num)) { float num2 = Mathf.MoveTowards(0f, num, maxRotation); ((Component)this).transform.eulerAngles = Vector2.op_Implicit(Util.RotateVector2(Vector2.op_Implicit(((Component)this).transform.eulerAngles), num2)); } } } public class WindLerp : MonoBehaviour { public WindZone windZone; public float windMain; public float windTurbulence; public float windPulseMagnitude; public float windPulseFrequency; public float lerpTime; private float initialWindMain; private float initialWindTurbulence; private float initialWindPulseMagnitude; private float initialWindPulseFrequency; private float stopwatch; private void Start() { initialWindMain = windZone.windMain; initialWindTurbulence = windZone.windTurbulence; initialWindPulseMagnitude = windZone.windPulseMagnitude; initialWindPulseFrequency = windZone.windPulseFrequency; } private void FixedUpdate() { windZone.windMain = Mathf.Lerp(initialWindMain, windMain, stopwatch / lerpTime); windZone.windTurbulence = Mathf.Lerp(initialWindTurbulence, windTurbulence, stopwatch / lerpTime); windZone.windPulseMagnitude = Mathf.Lerp(initialWindPulseMagnitude, windPulseMagnitude, stopwatch / lerpTime); windZone.windPulseFrequency = Mathf.Lerp(initialWindPulseFrequency, windPulseFrequency, stopwatch / lerpTime); if (stopwatch >= lerpTime) { ((Behaviour)this).enabled = false; } stopwatch += Time.fixedDeltaTime; } } [RequireComponent(typeof(SkillLocator))] public class ExecutionerController : NetworkBehaviour, IOnDamageDealtServerReceiver { private GenericSkill secondary; private ModelLocator modelLocator; private Animator modelAnimator; private ChildLocator childLocator; private float clipCycleEnd; private float chargeLevel; private float targetChargeLevel; private Transform transformExeAxe; public GameObject meshExeAxe; private bool axeVisible; public bool hasOOB; public bool isExec; private static int kRpcRpcAddIonCharge; private void Awake() { secondary = ((Component)this).GetComponent().secondary; modelLocator = ((Component)this).GetComponent(); } private void Start() { secondary.RemoveAllStocks(); modelAnimator = ((Component)modelLocator.modelTransform).GetComponent(); childLocator = ((Component)modelLocator.modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)childLocator)) { transformExeAxe = childLocator.FindChild("AxeSpawn"); } if (Object.op_Implicit((Object)(object)transformExeAxe)) { meshExeAxe = ((Component)transformExeAxe).gameObject; } meshExeAxe.SetActive(axeVisible); int layerIndex = modelAnimator.GetLayerIndex("Pack"); modelAnimator.Play("IonCharge", layerIndex); modelAnimator.Update(0f); } private void FixedUpdate() { if (!Object.op_Implicit((Object)(object)secondary)) { return; } targetChargeLevel = (float)secondary.stock * 10f / (float)secondary.maxStock * 10f * 0.01f; if (chargeLevel != targetChargeLevel) { if (targetChargeLevel > chargeLevel) { chargeLevel += 0.01f; } if (targetChargeLevel < chargeLevel) { chargeLevel = targetChargeLevel; } if (chargeLevel < 0f) { chargeLevel = 0f; } if (chargeLevel > 0.99f) { chargeLevel = 0.99f; } } if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.SetFloat("chargeLevel", chargeLevel); } } public void OnDamageDealtServer(DamageReport report) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)((Component)report.victim).gameObject != (Object)(object)report.attacker) || ((Enum)report.victimBody.bodyFlags).HasFlag((Enum)(object)(BodyFlags)4) || !(secondary.skillDef.skillName == "ExecutionerChargeIons")) { return; } ExecutionerKillComponent[] components = ((Component)report.victimBody).GetComponents(); foreach (ExecutionerKillComponent executionerKillComponent in components) { if ((Object)(object)executionerKillComponent.attacker == (Object)(object)((Component)this).gameObject) { executionerKillComponent.timeAlive = 0f; return; } } ((Component)report.victim).gameObject.AddComponent().attacker = ((Component)this).gameObject; } [ClientRpc] public void RpcAddIonCharge() { SkillLocator component = ((Component)this).gameObject.GetComponent(); GenericSkill val = (((Object)(object)component != (Object)null) ? component.secondary : null); if (Object.op_Implicit((Object)(object)val) && val.stock < val.maxStock) { val.AddOneStock(); } } private void UNetVersion() { } protected static void InvokeRpcRpcAddIonCharge(NetworkBehaviour obj, NetworkReader reader) { if (!NetworkClient.active) { Debug.LogError((object)"RPC RpcAddIonCharge called on server."); } else { ((ExecutionerController)(object)obj).RpcAddIonCharge(); } } public void CallRpcAddIonCharge() { //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) if (!NetworkServer.active) { Debug.LogError((object)"RPC Function RpcAddIonCharge called on client."); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)2); val.WritePackedUInt32((uint)kRpcRpcAddIonCharge); val.Write(((Component)this).GetComponent().netId); ((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcAddIonCharge"); } static ExecutionerController() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown kRpcRpcAddIonCharge = -1447229934; NetworkBehaviour.RegisterRpcDelegate(typeof(ExecutionerController), kRpcRpcAddIonCharge, new CmdDelegate(InvokeRpcRpcAddIonCharge)); NetworkCRC.RegisterBehaviour("ExecutionerController", 0); } 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() { } } [RequireComponent(typeof(CharacterModel))] public class ExecutionerEmissionController : MonoBehaviour { } public class ExecutionerKillComponent : MonoBehaviour, IOnKilledServerReceiver { public static float lifeTime = 1f; public GameObject attacker; public float timeAlive; public void FixedUpdate() { if (timeAlive >= lifeTime) { Object.Destroy((Object)(object)this); } timeAlive += Time.fixedDeltaTime; } public void OnKilledServer(DamageReport report) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Invalid comparison between Unknown and I4 //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_00bd: Unknown result type (might be due to invalid IL or missing references) int num = 1; CharacterBody component = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { num = Executioner.GetIonCountFromBody(component); } if ((int)report.victimBody.teamComponent.teamIndex == 3) { num *= 3; } if (report.victimBody.isElite) { num *= 2; } if (((Enum)report.damageInfo.damageType).HasFlag((Enum)(object)(DamageType)262144)) { num *= 2; } for (int i = 0; i < num; i++) { ExecutionerIonOrb executionerIonOrb = new ExecutionerIonOrb(); ((Orb)executionerIonOrb).origin = ((Component)this).transform.position; ((Orb)executionerIonOrb).target = Util.FindBodyMainHurtBox(attacker); OrbManager.instance.AddOrb((Orb)(object)executionerIonOrb); } if (num >= 50) { ExecutionerIonSuperOrb executionerIonSuperOrb = new ExecutionerIonSuperOrb(); ((Orb)executionerIonSuperOrb).origin = ((Component)this).transform.position; ((Orb)executionerIonSuperOrb).target = Util.FindBodyMainHurtBox(attacker); if ((float)num < 100f) { executionerIonSuperOrb.buffDuration = 12f; } OrbManager.instance.AddOrb((Orb)(object)executionerIonSuperOrb); } } public void Reset() { timeAlive = 0f; } } [RequireComponent(typeof(GenericOwnership))] [RequireComponent(typeof(NetworkIdentity))] [RequireComponent(typeof(HitBoxGroup))] [RequireComponent(typeof(NetworkStateMachine))] [RequireComponent(typeof(EntityStateMachine))] public class ExtinctionController : NetworkBehaviour { private protected TeamFilter teamFilter; private protected SimpleLeash simpleLeash; private protected GenericOwnership genericOwnership; private protected RadialForce RadialForce; private CharacterBody cachedOwnerBody; private float extraCharge; private float extraChargeDecayRate = 0.2f; private float visualSpin; [Tooltip("Root of the display, anything below this should not contain game logic.")] public Transform extinctionDisplayRoot; [Tooltip("Inner ring, will get bigger at a quicker pace than the rest of the prefab.")] public Transform ringIndicator; [Tooltip("Speed rate at which the displayRoot will spin.")] public float visualSpinRate = 1200f; public bool showExtinctionDisplay = true; public float charge { get; private set; } private void Awake() { teamFilter = ((Component)this).GetComponent(); genericOwnership = ((Component)this).GetComponent(); RadialForce = ((Component)this).GetComponent(); genericOwnership.onOwnerChanged += OnOwnerChanged; } private void OnEnable() { if (NetworkServer.active) { GlobalEventManager.onCharacterDeathGlobal += OnCharacterDeathGlobalServer; } } private void Start() { } private void Update() { if (NetworkClient.active) { UpdateClient(); } } public void FixedUpdate() { if (Object.op_Implicit((Object)(object)extinctionDisplayRoot)) { ((Component)extinctionDisplayRoot).gameObject.SetActive(showExtinctionDisplay); } if (extraCharge > 0f) { extraCharge -= extraChargeDecayRate * Time.deltaTime; } else { extraCharge = 0f; } charge = GetControllerCharge(); float radius = HGMath.CircleAreaToRadius((charge + 4.5f) * HGMath.CircleRadiusToArea(1f)); RadialForce.radius = radius; } private void OnDisable() { GlobalEventManager.onCharacterDeathGlobal -= OnCharacterDeathGlobalServer; } private void OnCharacterDeathGlobalServer(DamageReport obj) { if ((Object)(object)obj.attacker == (Object)(object)genericOwnership.ownerObject && (Object)(object)obj.attacker != (Object)null && (Object)(object)obj.damageInfo.inflictor == (Object)(object)this) { extraCharge += 5f; } } private void OnOwnerChanged(GameObject newOwner) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) cachedOwnerBody = (Object.op_Implicit((Object)(object)newOwner) ? newOwner.GetComponent() : null); teamFilter.teamIndex = cachedOwnerBody.teamComponent.teamIndex; } public float GetControllerCharge() { return Mathf.Max((float)cachedOwnerBody.inventory.GetItemCount(SS2Content.Items.RelicOfExtinction) + extraCharge, 0f); } [Client] private void UpdateClient() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) if (!NetworkClient.active) { Debug.LogWarning((object)"[Client] function 'System.Void Moonstorm.Starstorm2.Components.ExtinctionController::UpdateClient()' called on server"); return; } if (!NetworkClient.active) { Debug.LogWarning((object)"[Client] function 'System.Void Starstorm2.ExtinctionComponent::UpdateClient()' called on server"); return; } visualSpin = charge; float num = HGMath.CircleAreaToRadius(visualSpin * HGMath.CircleRadiusToArea(1f)); ringIndicator.localScale = new Vector3(num / 2f, num / 2f, num / 2f); ((Component)this).gameObject.transform.localScale = new Vector3(num, num, num); Vector3 localEulerAngles = ringIndicator.localEulerAngles; localEulerAngles.y += visualSpin * Time.deltaTime * visualSpinRate; ringIndicator.localEulerAngles = localEulerAngles; } private void UNetVersion() { } 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 FavoriteTooltipManager : NetworkBehaviour { private ItemDef itemDef; private GameObject zanzan; private TraderController zanzanController; private LanguageTextMeshController ltmc; private void Start() { zanzan = GameObject.Find("TraderBody(Clone)"); zanzanController = zanzan.GetComponent(); if (!((Object)(object)zanzanController == (Object)null)) { ltmc = ((Component)this).GetComponent(); string token = string.Format("{0}{1}{2}", Language.GetStringFormatted("SS2_TRADER_WANT_TEXT", Array.Empty()), Language.GetStringFormatted(zanzanController.favoriteItem.nameToken, Array.Empty()), Language.GetStringFormatted("SS2_TRADER_WANT2_TEXT", Array.Empty())); ltmc.token = token; } } private void UNetVersion() { } 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 GrabController : NetworkBehaviour { public delegate void ModifyGrabStateDelegate(EntityStateMachine entityStateMachine, ref EntityState grabState); public static float disableCollisionsOnExitTime; public static bool shouldLog; public static Dictionary victimsToGrabControllers; [NonSerialized] [SyncVar(hook = "SetVictim")] public GameObject victimBodyObject; [NonSerialized] public PassengerInfo victimInfo; private bool victimUsedGravity; [NonSerialized] public Collider[] victimColliders = Array.Empty(); public ModifyGrabStateDelegate grabStateModifier; public Transform grabTransform; public Vector3 grabOffset; public SerializableEntityStateType grabState = new SerializableEntityStateType(typeof(GrabbedState)); public bool shouldForceAllyState; private Collider collider; private TeamComponent teamComponent; private NetworkInstanceId ___victimBodyObjectNetId; private static int kCmdCmdGrab; public GameObject NetworkvictimBodyObject { get { return victimBodyObject; } [param: In] set { ref GameObject reference = ref victimBodyObject; if (NetworkServer.localClientActive && !((NetworkBehaviour)this).syncVarHookGuard) { ((NetworkBehaviour)this).syncVarHookGuard = true; SetVictim(value); ((NetworkBehaviour)this).syncVarHookGuard = false; } ((NetworkBehaviour)this).SetSyncVarGameObject(value, ref reference, 1u, ref ___victimBodyObjectNetId); } } public event Action onVictimGrabbed; public event Action onVictimReleased; private void Awake() { collider = ((Component)this).GetComponent(); teamComponent = ((Component)this).GetComponent(); } private void FixedUpdate() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) UpdateVictimPosition(); ForcePassengerState(); if (Object.op_Implicit((Object)(object)victimInfo.characterMotor)) { victimInfo.characterMotor.velocity = Vector3.zero; } } public void UpdateVictimPosition() { //IL_0014: 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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: 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_00d0: 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) if (Object.op_Implicit((Object)(object)grabTransform)) { Vector3 position = grabTransform.position; if (Object.op_Implicit((Object)(object)victimInfo.characterMotor)) { victimInfo.characterMotor.velocity = Vector3.zero; ((BaseCharacterController)victimInfo.characterMotor).Motor.BaseVelocity = Vector3.zero; ((BaseCharacterController)victimInfo.characterMotor).Motor.SetPosition(position, false); } else if (Object.op_Implicit((Object)(object)victimInfo.body) && Object.op_Implicit((Object)(object)victimInfo.body.rigidbody)) { victimInfo.body.rigidbody.MovePosition(position); } if (Object.op_Implicit((Object)(object)victimInfo.transform)) { victimInfo.transform.position = position; } } } public bool IsGrabbing() { return Object.op_Implicit((Object)(object)victimInfo.body); } private bool ShouldForcePassengerState() { //IL_0022: 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) if (Object.op_Implicit((Object)(object)victimInfo.body)) { if (victimInfo.body.teamComponent.teamIndex == teamComponent.teamIndex) { return shouldForceAllyState; } return true; } return false; } private void ForcePassengerState() { //IL_00c6: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)victimInfo.bodyStateMachine) || !((PassengerInfo)(ref victimInfo)).hasEffectiveAuthority) { return; } if (((object)victimInfo.bodyStateMachine.state).GetType() != ((SerializableEntityStateType)(ref grabState)).stateType && ShouldForcePassengerState()) { if (!victimInfo.bodyStateMachine.CanInterruptState((InterruptPriority)5) && !victimInfo.bodyStateMachine.IsInInitialState()) { return; } if (shouldLog) { SS2Log.Warning(string.Concat("GrabController.ForcePassengerState: Interrupted ", victimInfo.bodyStateMachine.state, " on ", victimBodyObject)); } EntityState nextState = EntityStateCatalog.InstantiateState(grabState); if (grabStateModifier != null) { grabStateModifier(victimInfo.bodyStateMachine, ref nextState); } victimInfo.bodyStateMachine.SetNextState(nextState); SetStateOnHurt component = ((Component)victimInfo.body).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } EntityStateMachine[] idleStateMachine = component.idleStateMachine; foreach (EntityStateMachine val in idleStateMachine) { if (val.CanInterruptState((InterruptPriority)5)) { val.SetNextStateToMain(); } } } else if (!ShouldForcePassengerState() && ((object)victimInfo.bodyStateMachine.state).GetType() == ((SerializableEntityStateType)(ref grabState)).stateType) { if (shouldLog) { SS2Log.Warning("GrabController.ForcePassengerState: Return to main state " + victimInfo.body); } victimInfo.bodyStateMachine.SetNextStateToMain(); } } private void OnDestroy() { SetVictim(null); } public void AttemptGrab(GameObject bodyObject) { if (NetworkServer.active) { if (shouldLog) { SS2Log.Info("GrabController.AttemptGrab: NetworkServer.active == true" + bodyObject); } AssignVictim(bodyObject); } else if (Util.HasEffectiveAuthority(((Component)this).gameObject)) { if (shouldLog) { SS2Log.Info("GrabController.AttemptGrab: isAuthority == true" + bodyObject); } CallCmdGrab(bodyObject); if (shouldLog) { SS2Log.Info("GrabController.AttemptGrab: NetworkServer.active == false" + bodyObject); } SetVictim(bodyObject); } else { SS2Log.Error("GrabController.AttemptGrab: AttemptGrab called on client without authority!", 180, "AttemptGrab"); } } [Command] public void CmdGrab(GameObject bodyObject) { if (shouldLog) { SS2Log.Info("GrabController.CmdGrab " + bodyObject); } AssignVictim(bodyObject); } [Server] public void AssignVictim(GameObject bodyObject) { if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void Moonstorm.Starstorm2.Components.GrabController::AssignVictim(UnityEngine.GameObject)' called on client"); return; } if (shouldLog) { SS2Log.Info("GrabController.AssignVictim " + bodyObject); } if (Object.op_Implicit((Object)(object)bodyObject)) { CharacterBody component = bodyObject.GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.currentVehicle)) { component.currentVehicle.EjectPassenger(bodyObject); } if (victimsToGrabControllers.TryGetValue(bodyObject, out var value)) { value.AssignVictim(null); } } SetVictim(bodyObject); } private void SetVictim(GameObject bodyObject) { if (shouldLog) { SS2Log.Info("GrabController.SetVictim " + bodyObject); } if (((NetworkBehaviour)this).syncVarHookGuard) { if (shouldLog) { SS2Log.Info("GrabController.SetVictim syncVarHookGuard == true"); } NetworkvictimBodyObject = bodyObject; } else if ((Object)(object)victimBodyObject == (Object)(object)bodyObject) { if (shouldLog) { Debug.Log((object)"ReferenceEquals(passengerBodyObject, newPassengerBodyObject)==true"); } } else { SetVictimInternal(bodyObject); } } private void SetVictimInternal(GameObject bodyObject) { //IL_003d: 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_0054: Unknown result type (might be due to invalid IL or missing references) if (shouldLog) { SS2Log.Info("GrabController.SetVictimInternal " + bodyObject); } if (Object.op_Implicit((Object)(object)victimBodyObject)) { EndGrab(victimBodyObject); } NetworkvictimBodyObject = bodyObject; victimInfo = default(PassengerInfo); victimColliders = Array.Empty(); grabOffset = Vector3.zero; if (Object.op_Implicit((Object)(object)victimBodyObject)) { StartGrab(victimBodyObject); } } private void StartGrab(GameObject victim) { //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_0244: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) if (shouldLog) { SS2Log.Info("GrabController.StartGrab " + victim); } victimInfo = new PassengerInfo(victimBodyObject); if (Util.HasEffectiveAuthority(((Component)this).gameObject)) { CharacterNetworkTransform component = victim.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.hasEffectiveAuthority = true; } } DisableCollisionsForDuration component2 = victim.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { Object.Destroy((Object)(object)component2); } victimColliders = victimBodyObject.GetComponentsInChildren(); if (Object.op_Implicit((Object)(object)victimInfo.characterModel)) { Collider[] array = (from c in ((Component)victimInfo.characterModel).gameObject.GetComponentsInChildren() where !Object.op_Implicit((Object)(object)((Component)c).GetComponent()) select c).ToArray(); victimColliders = ArrayUtils.Join(array, victimColliders); } StringBuilder stringBuilder = new StringBuilder(); if (shouldLog) { SS2Log.Info("Disabling colliders on " + victim); } Collider[] array2 = victimColliders; foreach (Collider val in array2) { if (shouldLog) { stringBuilder.Append("Disabled: ").Append(((Object)val).name).AppendLine(); } val.enabled = false; } if (shouldLog) { SS2Log.Info(stringBuilder.ToString()); } ForcePassengerState(); victimUsedGravity = true; if (Object.op_Implicit((Object)(object)victimInfo.characterMotor)) { ((Behaviour)victimInfo.characterMotor).enabled = false; } else if (Object.op_Implicit((Object)(object)victimInfo.body) && Object.op_Implicit((Object)(object)victimInfo.body.rigidbody)) { GameObject bodyPrefab = BodyCatalog.GetBodyPrefab(victimInfo.body.bodyIndex); if (Object.op_Implicit((Object)(object)bodyPrefab)) { Rigidbody component3 = bodyPrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component3)) { victimUsedGravity = component3.useGravity; } } victimInfo.body.rigidbody.useGravity = false; } if (Object.op_Implicit((Object)(object)victimInfo.body)) { victimInfo.body.healthComponent.lastHitAttacker = ((Component)this).gameObject; if (FriendlyFireManager.ShouldDirectHitProceed(victimInfo.body.healthComponent, teamComponent.teamIndex)) { victimInfo.body.healthComponent.lastHitTime = FixedTimeStamp.now; } } victimsToGrabControllers.Add(victimBodyObject, this); if (this.onVictimGrabbed != null) { this.onVictimGrabbed(victimInfo); } } private void EndGrab(GameObject victim) { //IL_0161: Unknown result type (might be due to invalid IL or missing references) if (shouldLog) { SS2Log.Info("GrabController.EndGrab " + victim); } if (Util.HasEffectiveAuthority(((Component)this).gameObject)) { CharacterNetworkTransform component = victim.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.UpdateAuthority(); } } DisableCollisionsForDuration disableCollisionsForDuration = victim.AddComponent(); disableCollisionsForDuration.collidersSelf = victimColliders; disableCollisionsForDuration.collidersOther = (Collider[])(object)new Collider[1] { collider }; disableCollisionsForDuration.disableSelfColliders = true; disableCollisionsForDuration.timer = disableCollisionsOnExitTime; if (Object.op_Implicit((Object)(object)victimInfo.body) && Object.op_Implicit((Object)(object)victimInfo.body.rigidbody)) { victimInfo.body.rigidbody.useGravity = victimUsedGravity; } if (Object.op_Implicit((Object)(object)victimInfo.characterMotor)) { ((Behaviour)victimInfo.characterMotor).enabled = true; } if (((PassengerInfo)(ref victimInfo)).hasEffectiveAuthority && Object.op_Implicit((Object)(object)victimInfo.bodyStateMachine) && ((object)victimInfo.bodyStateMachine.state).GetType() == ((SerializableEntityStateType)(ref grabState)).stateType) { if (shouldLog) { SS2Log.Info("GrabController.EndGrab: Setting state to main"); } victimInfo.bodyStateMachine.SetNextStateToMain(); } victimsToGrabControllers.Remove(victimBodyObject); if (this.onVictimReleased != null) { this.onVictimReleased(victimInfo); } } static GrabController() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown disableCollisionsOnExitTime = 0.2f; victimsToGrabControllers = new Dictionary(); kCmdCmdGrab = 1426228948; NetworkBehaviour.RegisterCommandDelegate(typeof(GrabController), kCmdCmdGrab, new CmdDelegate(InvokeCmdCmdGrab)); NetworkCRC.RegisterBehaviour("GrabController", 0); } private void UNetVersion() { } protected static void InvokeCmdCmdGrab(NetworkBehaviour obj, NetworkReader reader) { if (!NetworkServer.active) { Debug.LogError((object)"Command CmdGrab called on client."); } else { ((GrabController)(object)obj).CmdGrab(reader.ReadGameObject()); } } public void CallCmdGrab(GameObject bodyObject) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) if (!NetworkClient.active) { Debug.LogError((object)"Command function CmdGrab called on server."); return; } if (((NetworkBehaviour)this).isServer) { CmdGrab(bodyObject); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)5); val.WritePackedUInt32((uint)kCmdCmdGrab); val.Write(((Component)this).GetComponent().netId); val.Write(bodyObject); ((NetworkBehaviour)this).SendCommandInternal(val, 0, "CmdGrab"); } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.Write(victimBodyObject); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & (true ? 1u : 0u)) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(victimBodyObject); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { //IL_0008: 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) if (initialState) { ___victimBodyObjectNetId = reader.ReadNetworkId(); return; } int num = (int)reader.ReadPackedUInt32(); if (((uint)num & (true ? 1u : 0u)) != 0) { SetVictim(reader.ReadGameObject()); } } public override void PreStartClient() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkInstanceId)(ref ___victimBodyObjectNetId)).IsEmpty()) { NetworkvictimBodyObject = ClientScene.FindLocalObject(___victimBodyObjectNetId); } } } public class ModifiedArtifactFormulaDisplay : MonoBehaviour { [Serializable] public struct ArtifactCompoundDisplayInfo { public ArtifactCompoundDef artifactCompoundDef; public VanillaCompoundEnum vanillaCompoundEnum; public Decal decal; } public ArtifactCompoundDisplayInfo[] artifactCompoundDisplayInfos; private void Start() { ArtifactCompoundDisplayInfo[] array = artifactCompoundDisplayInfos; for (int i = 0; i < array.Length; i++) { ArtifactCompoundDisplayInfo artifactCompoundDisplayInfo = array[i]; if ((Object)(object)artifactCompoundDisplayInfo.artifactCompoundDef != (Object)null) { artifactCompoundDisplayInfo.decal.Material = artifactCompoundDisplayInfo.artifactCompoundDef.decalMaterial; continue; } switch (artifactCompoundDisplayInfo.vanillaCompoundEnum) { case VanillaCompoundEnum.Circle: artifactCompoundDisplayInfo.decal.Material = Resources.Load("artifactcompound/acdCircle").decalMaterial; break; case VanillaCompoundEnum.Diamond: artifactCompoundDisplayInfo.decal.Material = Resources.Load("artifactcompound/acdDiamond").decalMaterial; break; case VanillaCompoundEnum.Square: artifactCompoundDisplayInfo.decal.Material = Resources.Load("artifactcompound/acdSquare").decalMaterial; break; case VanillaCompoundEnum.Triangle: artifactCompoundDisplayInfo.decal.Material = Resources.Load("artifactcompound/acdTriangle").decalMaterial; break; case VanillaCompoundEnum.None: artifactCompoundDisplayInfo.decal.Material = null; break; } } } } public enum VanillaCompoundEnum { Circle, Square, Triangle, Diamond, None } [RequireComponent(typeof(ChildLocator))] public class ModifiedFootstepHandler : MonoBehaviour { public string baseFootstepString; public string sprintFootstepOverrideString; public bool enableFootstepDust; public GameObject footstepDustPrefab; public GameObject footstepEffect; private ChildLocator childLocator; private Animator animator; private Transform footstepDustInstanceTransform; private ParticleSystem footstepDustInstanceParticleSystem; private ShakeEmitter footstepDustInstanceShakeEmitter; private CharacterBody body; private void Start() { childLocator = ((Component)this).GetComponent(); body = ((Component)this).GetComponent()?.body; animator = ((Component)this).GetComponent(); if (enableFootstepDust && Object.op_Implicit((Object)(object)footstepDustPrefab)) { footstepDustInstanceTransform = Object.Instantiate(footstepDustPrefab, ((Component)this).transform).transform; footstepDustInstanceParticleSystem = ((Component)footstepDustInstanceTransform).GetComponent(); footstepDustInstanceShakeEmitter = ((Component)footstepDustInstanceTransform).GetComponent(); } } public void Footstep(string childName) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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_00b6: 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_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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)body) || !enableFootstepDust) { return; } Transform val = childLocator.FindChild(childName); if (Object.op_Implicit((Object)(object)val)) { Color gray = Color.gray; RaycastHit val2 = default(RaycastHit); Vector3 position = val.position; position.y += 1.5f; Debug.DrawRay(position, Vector3.down); if (Physics.Raycast(new Ray(position, Vector3.down), ref val2, 4f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.water)).mask), (QueryTriggerInteraction)2)) { if (Object.op_Implicit((Object)(object)footstepEffect)) { EffectManager.SimpleImpactEffect(footstepEffect, ((RaycastHit)(ref val2)).point, ((RaycastHit)(ref val2)).normal, false); } if (Object.op_Implicit((Object)(object)footstepDustInstanceTransform)) { footstepDustInstanceTransform.position = ((RaycastHit)(ref val2)).point; MainModule main = footstepDustInstanceParticleSystem.main; ((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(gray); footstepDustInstanceParticleSystem.Play(); if (Object.op_Implicit((Object)(object)footstepDustInstanceShakeEmitter)) { footstepDustInstanceShakeEmitter.StartShake(); } } } Util.PlaySound((!string.IsNullOrEmpty(sprintFootstepOverrideString) && body.isSprinting) ? sprintFootstepOverrideString : baseFootstepString, ((Component)body).gameObject); } else { Debug.LogWarningFormat("Object {0} lacks ChildLocator entry \"{1}\" to handle Footstep event!", new object[2] { ((Object)((Component)this).gameObject).name, childName }); } } public void OnDestroy() { if (Object.op_Implicit((Object)(object)footstepDustInstanceTransform)) { Object.Destroy((Object)(object)((Component)footstepDustInstanceTransform).gameObject); } } } public class MonsterAIDebug : MonoBehaviour { private BaseAI ai; private AISkillDriver selection; private GameObject target; private void Awake() { ai = ((Component)this).GetComponent(); if (!Object.op_Implicit((Object)(object)ai)) { SS2Log.Warning("cant debug with no ai stupid"); Object.Destroy((Object)(object)this); } } private void FixedUpdate() { if ((ai.skillDriverEvaluation.aimTarget != null && (Object)(object)ai.skillDriverEvaluation.aimTarget.gameObject != (Object)(object)target) || (Object)(object)ai.skillDriverEvaluation.dominantSkillDriver != (Object)(object)selection) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append("AISkillDriver: " + (Object.op_Implicit((Object)(object)ai.skillDriverEvaluation.dominantSkillDriver) ? ai.skillDriverEvaluation.dominantSkillDriver.customName : "None")).AppendLine(); stringBuilder.Append("SkillSlot: " + (Object.op_Implicit((Object)(object)ai.skillDriverEvaluation.dominantSkillDriver) ? ((object)(SkillSlot)(ref ai.skillDriverEvaluation.dominantSkillDriver.skillSlot)).ToString() : "None")).AppendLine(); stringBuilder.Append("Target: " + ((ai.skillDriverEvaluation.aimTarget != null) ? ((Object)ai.skillDriverEvaluation.aimTarget.gameObject).name : "None")).AppendLine(); stringBuilder.Append("Distance: " + Mathf.Sqrt(ai.skillDriverEvaluation.separationSqrMagnitude)).AppendLine(); stringBuilder.Append("-----------------------").AppendLine(); Chat.AddMessage(stringBuilder.ToString()); target = ((ai.skillDriverEvaluation.aimTarget != null) ? ai.skillDriverEvaluation.aimTarget.gameObject : null); selection = ai.skillDriverEvaluation.dominantSkillDriver; } } } public class NemCaptainController : NetworkBehaviour, IOnTakeDamageServerReceiver, IOnDamageDealtServerReceiver, IOnKilledOtherServerReceiver { [Header("Cached Components")] public CharacterBody characterBody; public Animator characterAnimator; [Header("Drone Orders")] public SkillFamily deck; public GenericSkill hand1; public GenericSkill hand2; public GenericSkill hand3; public GenericSkill hand4; public SkillDef nullSkill; private List drawnSkillIndicies = new List(); private bool initialDeck = true; [HideInInspector] public SkillDef cachedPrimary; [Header("Stress Values")] public float minStress; public float maxStress; public float stressPerSecondInCombat; public float stressPerSecondOutOfCombat; public float stressPerSecondWhileOverstressed; public float stressPerSecondWhileRegenBuff; public float stressGainedOnFullDamage; public float stressGainedOnOSP; public float stressGainedOnHeal; public float stressGainedOnCrit; public float stressGainedOnKill; public float stressGainedOnMinibossKill; public float stressGainedOnBossKill; public float stressGainedWhenSurrounded; public float stressGainedOnItem; public float stressOnOutOfOrders; public float surroundedThreshold; [HideInInspector] public static float enemyCheckInterval = 0.03333333f; [HideInInspector] private static float enemyCheckStopwatch = 0f; private SphereSearch enemySearch; private List hits; public float enemyRadius = 12f; [Header("Stress UI")] [SerializeField] public GameObject stressOverlayPrefab; [SerializeField] public string stressOverlayChildLocatorEntry; private ChildLocator stressOverlayInstanceChildlocator; private OverlayController stressOverlayController; private List fillUiList = new List(); private Text uiStressText; [Header("Hand UI")] [SerializeField] public GameObject cardOverlayPrefab; [SerializeField] public string cardOverlayChildLocatorEntry; private ChildLocator cardOverlayInstanceChildlocator; private OverlayController cardOverlayController; private NemCaptainSkillIcon ncsi1; private NemCaptainSkillIcon ncsi2; private NemCaptainSkillIcon ncsi3; private NemCaptainSkillIcon ncsi4; [Header("Drones & Drone Positions")] [SerializeField] public GameObject droneA; private Transform droneABaseTransform; [SerializeField] public GameObject droneB; private Transform droneBBaseTransform; [SerializeField] public GameObject droneC; private Transform droneCBaseTransform; [SerializeField] public GameObject droneAimRoot; private Transform droneAimRootTransform; private int itemCount; [SyncVar(hook = "OnStressModified")] private float _stress; public float stress => _stress; public float stressFraction => stress / maxStress; public float stressPercentage => stressFraction * 100f; public bool isFullStress => stress >= maxStress; public bool isOverstressed { get { if (Object.op_Implicit((Object)(object)characterBody)) { return characterBody.HasBuff(SS2Content.Buffs.bdOverstress); } return false; } } private HealthComponent bodyHealthComponent => characterBody.healthComponent; public float Network_stress { get { return _stress; } [param: In] set { if (NetworkServer.localClientActive && ((NetworkBehaviour)this).syncVarHookGuard) { ((NetworkBehaviour)this).syncVarHookGuard = true; OnStressModified(value); ((NetworkBehaviour)this).syncVarHookGuard = false; } ((NetworkBehaviour)this).SetSyncVar(value, ref _stress, 1u); } } [Server] public void AddStress(float amount) { if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void Moonstorm.Starstorm2.Components.NemCaptainController::AddStress(System.Single)' called on client"); return; } if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'Moonstorm.Starstorm2.Components.NemCaptainController::AddStress(System.Single)' called on client"); return; } if (characterBody.HasBuff(SS2Content.Buffs.bdNemCapManaReduction) && amount > 0f) { amount /= 2f; } Network_stress = Mathf.Clamp(stress + amount, minStress, maxStress); } private void OnEnable() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0022: 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_002b: 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_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Expected O, but got Unknown //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) OverlayCreationParams val = default(OverlayCreationParams); val.prefab = stressOverlayPrefab; val.childLocatorEntry = stressOverlayChildLocatorEntry; OverlayCreationParams val2 = val; stressOverlayController = HudOverlayManager.AddOverlay(((Component)this).gameObject, val2); stressOverlayController.onInstanceAdded += OnStressOverlayInstanceAdded; stressOverlayController.onInstanceRemove += OnStressOverlayInstanceRemoved; val = default(OverlayCreationParams); val.prefab = cardOverlayPrefab; val.childLocatorEntry = cardOverlayChildLocatorEntry; OverlayCreationParams val3 = val; cardOverlayController = HudOverlayManager.AddOverlay(((Component)this).gameObject, val3); cardOverlayController.onInstanceAdded += OnCardOverlayInstanceAdded; cardOverlayController.onInstanceRemove += OnCardOverlayInstanceRemoved; if ((Object)(object)droneA != (Object)null) { droneABaseTransform = droneA.transform; } if ((Object)(object)droneB != (Object)null) { droneBBaseTransform = droneB.transform; } if ((Object)(object)droneC != (Object)null) { droneCBaseTransform = droneC.transform; } if ((Object)(object)droneAimRoot != (Object)null) { droneAimRootTransform = droneAimRoot.transform; } hits = new List(); enemySearch = new SphereSearch(); enemySearch.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; enemySearch.radius = enemyRadius; if ((Object)(object)characterBody != (Object)null && NetworkServer.active) { HealthComponent.onCharacterHealServer += OnCharacterHealServer; InitializeCards(); } } private void InitializeCards() { if (initialDeck) { drawnSkillIndicies.Clear(); initialDeck = false; Debug.Log((object)"did initial clear"); } hand1.SetSkillOverride((object)((Component)this).gameObject, GetRandomSkillDefFromDeck(), (SkillOverridePriority)3); if ((Object)(object)hand1.skillDef == (Object)(object)nullSkill) { hand1.UnsetSkillOverride((object)((Component)this).gameObject, hand1.skillDef, (SkillOverridePriority)3); } Debug.Log((object)("gave hand 1 skill : " + hand1.skillDef)); hand2.SetSkillOverride((object)((Component)this).gameObject, GetRandomSkillDefFromDeck(), (SkillOverridePriority)3); if ((Object)(object)hand2.skillDef == (Object)(object)nullSkill) { hand2.UnsetSkillOverride((object)((Component)this).gameObject, hand2.skillDef, (SkillOverridePriority)3); } Debug.Log((object)("gave hand 2 skill: " + hand2.skillDef)); hand3.SetSkillOverride((object)((Component)this).gameObject, GetRandomSkillDefFromDeck(), (SkillOverridePriority)3); if ((Object)(object)hand3.skillDef == (Object)(object)nullSkill) { hand3.UnsetSkillOverride((object)((Component)this).gameObject, hand3.skillDef, (SkillOverridePriority)3); } Debug.Log((object)("gave hand 3 skill: " + hand3.skillDef)); hand4.SetSkillOverride((object)((Component)this).gameObject, GetRandomSkillDefFromDeck(), (SkillOverridePriority)3); if ((Object)(object)hand4.skillDef == (Object)(object)nullSkill) { hand4.UnsetSkillOverride((object)((Component)this).gameObject, hand4.skillDef, (SkillOverridePriority)3); } Debug.Log((object)("gave hand 4 skill: " + hand4.skillDef)); } public SkillDef GetRandomSkillDefFromDeck() { if (drawnSkillIndicies.Count == deck.variants.Length) { Debug.Log((object)"deck fully used; clearing"); drawnSkillIndicies.Clear(); } Debug.Log((object)"starting to get random skill from deck"); int num; do { num = Random.Range(0, deck.variants.Length); } while (drawnSkillIndicies.Contains(num)); drawnSkillIndicies.Add(num); return deck.variants[num].skillDef; } public void DiscardCardFromHand(int handIndex) { GenericSkill handByIndex = GetHandByIndex(handIndex); if ((Object)(object)handByIndex != (Object)null) { Debug.Log((object)"discarded hand"); handByIndex.UnsetSkillOverride((object)((Component)this).gameObject, handByIndex.skillDef, (SkillOverridePriority)3); handByIndex.SetSkillOverride((object)((Component)this).gameObject, nullSkill, (SkillOverridePriority)1); } } public void DiscardCardsAndReplace() { DiscardCardFromHand(1); Debug.Log((object)"discarded hand 1"); DiscardCardFromHand(2); Debug.Log((object)"discarded hand 2"); DiscardCardFromHand(3); Debug.Log((object)"discarded hand 3"); DiscardCardFromHand(4); Debug.Log((object)"discarded hand 4"); InitializeCards(); } private GenericSkill GetHandByIndex(int handIndex) { return (GenericSkill)(handIndex switch { 1 => hand1, 2 => hand2, 3 => hand3, 4 => hand4, _ => null, }); } private void OnDisable() { if (stressOverlayController != null) { stressOverlayController.onInstanceAdded -= OnStressOverlayInstanceAdded; stressOverlayController.onInstanceRemove -= OnStressOverlayInstanceRemoved; fillUiList.Clear(); HudOverlayManager.RemoveOverlay(stressOverlayController); } if (Object.op_Implicit((Object)(object)characterBody) && NetworkServer.active) { HealthComponent.onCharacterHealServer -= OnCharacterHealServer; } } private void OnStressOverlayInstanceAdded(OverlayController controller, GameObject instance) { fillUiList.Add(instance.GetComponent()); uiStressText = instance.GetComponent(); stressOverlayInstanceChildlocator = instance.GetComponent(); } private void OnStressOverlayInstanceRemoved(OverlayController controller, GameObject instance) { fillUiList.Remove(instance.GetComponent()); } private void OnCardOverlayInstanceAdded(OverlayController controller, GameObject instance) { cardOverlayInstanceChildlocator = instance.GetComponent(); if ((Object)(object)cardOverlayInstanceChildlocator == (Object)null) { Debug.Log((object)"card overlay instance childlocator null; returning"); return; } Transform val = cardOverlayInstanceChildlocator.FindChild("Skill1"); if ((Object)(object)val != (Object)null) { Debug.Log((object)"setting skill 1"); ncsi1 = ((Component)val).GetComponent(); ncsi1.ncc = this; ncsi1.targetSkill = hand1; } Transform val2 = cardOverlayInstanceChildlocator.FindChild("Skill2"); if ((Object)(object)val2 != (Object)null) { Debug.Log((object)"setting skill 2"); ncsi2 = ((Component)val2).GetComponent(); ncsi2.ncc = this; ncsi2.targetSkill = hand2; } Transform val3 = cardOverlayInstanceChildlocator.FindChild("Skill3"); if ((Object)(object)val3 != (Object)null) { Debug.Log((object)"setting skill 3"); ncsi3 = ((Component)val3).GetComponent(); ncsi3.ncc = this; ncsi3.targetSkill = hand3; } Transform val4 = cardOverlayInstanceChildlocator.FindChild("Skill4"); if ((Object)(object)val4 != (Object)null) { Debug.Log((object)"setting skill 4"); ncsi4 = ((Component)val4).GetComponent(); ncsi4.ncc = this; ncsi4.targetSkill = hand4; } } private void OnCardOverlayInstanceRemoved(OverlayController controller, GameObject instance) { fillUiList.Remove(instance.GetComponent()); } private void CheckRefresh(GenericSkill gs) { if (gs.stock > 0) { gs.SetSkillOverride((object)((Component)this).gameObject, GetRandomSkillDefFromDeck(), (SkillOverridePriority)3); } } private void FixedUpdate() { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Invalid comparison between Unknown and I4 //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Invalid comparison between Unknown and I4 float num = (characterBody.outOfCombat ? stressPerSecondOutOfCombat : stressPerSecondInCombat); if (NetworkServer.active) { enemyCheckStopwatch += Time.fixedDeltaTime; if (enemyCheckStopwatch >= enemyCheckInterval) { enemyCheckStopwatch -= enemyCheckInterval; float num2 = 0f; hits.Clear(); enemySearch.ClearCandidates(); enemySearch.origin = characterBody.corePosition; enemySearch.RefreshCandidates(); enemySearch.FilterCandidatesByDistinctHurtBoxEntities(); enemySearch.FilterCandidatesByHurtBoxTeam(TeamMask.GetUnprotectedTeams(characterBody.teamComponent.teamIndex)); enemySearch.GetHurtBoxes(hits); if (hits.Count > 5) { foreach (HurtBox hit in hits) { HealthComponent healthComponent = hit.healthComponent; if (!Object.op_Implicit((Object)(object)healthComponent)) { continue; } CharacterBody val = healthComponent?.body; if (!Object.op_Implicit((Object)(object)val) || !((Object)(object)val != (Object)(object)characterBody) || ((Enum)val.bodyFlags).HasFlag((Enum)(object)(BodyFlags)4)) { continue; } num2 += 1f; if ((int)val.hullClassification == 1 || (int)val.hullClassification == 2 || val.isElite) { num2 += 1f; if (val.isChampion || val.isBoss) { num2 += 1f; } } } if (num2 > surroundedThreshold) { num += stressGainedWhenSurrounded; } } } } if ((Object)(object)hand1.skillDef == (Object)(object)nullSkill) { CheckRefresh(hand1); } if ((Object)(object)hand2.skillDef == (Object)(object)nullSkill) { CheckRefresh(hand2); } if ((Object)(object)hand3.skillDef == (Object)(object)nullSkill) { CheckRefresh(hand3); } if ((Object)(object)hand4.skillDef == (Object)(object)nullSkill) { CheckRefresh(hand4); } if (characterBody.HasBuff(SS2Content.Buffs.bdNemCapManaRegen)) { num += stressPerSecondWhileRegenBuff; } if (isOverstressed) { num = stressPerSecondWhileOverstressed; } if (NetworkServer.active && !characterBody.HasBuff(Buffs.HiddenInvincibility)) { AddStress(num * Time.fixedDeltaTime); } UpdateUI(); if (NetworkServer.active) { if (stress >= maxStress && !isOverstressed) { characterBody.SetBuffCount(SS2Content.Buffs.bdOverstress.buffIndex, 1); } if (stress <= minStress && isOverstressed) { characterBody.SetBuffCount(SS2Content.Buffs.bdOverstress.buffIndex, 0); } } } private void UpdateUI() { //IL_0083: Unknown result type (might be due to invalid IL or missing references) foreach (ImageFillController fillUi in fillUiList) { fillUi.SetTValue(stress / maxStress); } if (Object.op_Implicit((Object)(object)stressOverlayInstanceChildlocator)) { stressOverlayInstanceChildlocator.FindChild("StressThreshold").rotation = Quaternion.Euler(0f, 0f, Mathf.InverseLerp(0f, maxStress, stress) * -360f); } if (Object.op_Implicit((Object)(object)uiStressText)) { StringBuilder stringBuilder = StringBuilderPool.RentStringBuilder(); StringBuilderExtensions.AppendInt(stringBuilder, Mathf.FloorToInt(stress), 1u, 3u).Append("%"); uiStressText.text = stringBuilder.ToString(); StringBuilderPool.ReturnStringBuilder(stringBuilder); } } private void OnCharacterHealServer(HealthComponent healthComponent, float amount, ProcChainMask procChainMask) { if ((Object)(object)healthComponent == (Object)(object)bodyHealthComponent) { float num = amount / bodyHealthComponent.fullCombinedHealth; AddStress(num * stressGainedOnHeal); } } public void OnDamageDealtServer(DamageReport damageReport) { if (damageReport.damageInfo.crit) { AddStress(damageReport.damageInfo.procCoefficient * stressGainedOnCrit); } } public void OnTakeDamageServer(DamageReport damageReport) { float num = damageReport.damageDealt / bodyHealthComponent.fullCombinedHealth; AddStress(num * stressGainedOnFullDamage); } public void OnKilledOtherServer(DamageReport damageReport) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Invalid comparison between Unknown and I4 //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Invalid comparison between Unknown and I4 if (damageReport.victimIsBoss || damageReport.victimIsChampion || (int)damageReport.victimBody.hullClassification == 2) { AddStress(stressGainedOnBossKill); } else if (damageReport.victimIsElite || (int)damageReport.victimBody.hullClassification == 1) { AddStress(stressGainedOnMinibossKill); } else { AddStress(stressGainedOnKill); } } private void OnInventoryChanged() { } private void OnStressModified(float newStress) { Network_stress = newStress; } public override void PreStartClient() { } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.Write(_stress); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & (true ? 1u : 0u)) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(_stress); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { if (initialState) { _stress = reader.ReadSingle(); } else if ((reader.ReadPackedUInt32() & (true ? 1u : 0u)) != 0) { OnStressModified(reader.ReadSingle()); } } } public class NemCaptainSkillIcon : MonoBehaviour { public GenericSkill targetSkill; public NemCaptainController ncc; public Image iconImage; public TooltipProvider tooltipProvider; public PlayerCharacterMasterController pcmc; private void Update() { //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: 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_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_0047: 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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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) //IL_0074: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)targetSkill)) { if (Object.op_Implicit((Object)(object)tooltipProvider)) { Color bodyColor = targetSkill.characterBody.bodyColor; SurvivorCatalog.GetSurvivorIndexFromBodyIndex(targetSkill.characterBody.bodyIndex); float num = default(float); float num2 = default(float); float num3 = default(float); Color.RGBToHSV(bodyColor, ref num, ref num2, ref num3); num3 = ((num3 > 0.7f) ? 0.7f : num3); bodyColor = Color.HSVToRGB(num, num2, num3); tooltipProvider.titleColor = bodyColor; tooltipProvider.titleToken = targetSkill.skillNameToken; tooltipProvider.bodyToken = targetSkill.skillDescriptionToken; } if (Object.op_Implicit((Object)(object)iconImage)) { ((Behaviour)iconImage).enabled = true; ((Graphic)iconImage).color = Color.white; iconImage.sprite = targetSkill.icon; } } else { if (Object.op_Implicit((Object)(object)tooltipProvider)) { tooltipProvider.bodyColor = Color.gray; tooltipProvider.titleToken = ""; tooltipProvider.bodyToken = ""; } if (Object.op_Implicit((Object)(object)iconImage)) { ((Behaviour)iconImage).enabled = false; iconImage.sprite = null; } } } } public class ArrowPickup : MonoBehaviour { [Tooltip("The base object to destroy when this pickup is consumed.")] public GameObject baseObject; [Tooltip("The team filter of who can pick up this pack.")] public TeamFilter teamFilter; [Tooltip("The character body who can pick up this pack.")] public CharacterBody characterBody; private bool alive = true; private void OnTriggerStay(Collider other) { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: 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_00cc: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)"ontriggerstay"); if (!NetworkServer.active || !alive) { return; } Debug.Log((object)"active and alive"); if (!((Object)(object)((Component)other).gameObject.GetComponent() != (Object)null)) { return; } Debug.Log((object)"char body"); CharacterBody component = ((Component)other).gameObject.GetComponent(); if (!((Object)(object)component != (Object)null)) { return; } Debug.Log((object)"object body"); TeamIndex objectTeam = TeamComponent.GetObjectTeam(((Component)other).gameObject); SkillLocator skillLocator = component.skillLocator; if ((Object)(object)skillLocator != (Object)null && skillLocator.primary.stock < 7 && objectTeam == teamFilter.teamIndex && component.bodyIndex == characterBody.bodyIndex) { alive = false; _ = ((Component)this).transform.position; GenericSkill primary = characterBody.skillLocator.primary; int stock = primary.stock; primary.stock = stock + 1; Debug.Log((object)"picked up"); if (characterBody.skillLocator.primary.stock > 7) { characterBody.skillLocator.primary.stock = 7; } Object.Destroy((Object)(object)baseObject); } } } public class GravitateArrowPickup : MonoBehaviour { private Transform gravitateTarget; [Tooltip("The rigidbody to set the velocity of.")] public Rigidbody rb; [Tooltip("The TeamFilter of the team that can activate this trigger.")] public TeamFilter teamFilter; [Tooltip("The CharacterBody which can activate this trigger.")] public CharacterBody characterBody; public float acceleration; public float maxSpeed; private void Start() { } private void OnTriggerEnter(Collider other) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Invalid comparison between Unknown and I4 //IL_0034: 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) //IL_0047: 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) if (NetworkServer.active && !Object.op_Implicit((Object)(object)gravitateTarget) && (int)teamFilter.teamIndex != -1) { CharacterBody component = ((Component)other).gameObject.GetComponent(); if (TeamComponent.GetObjectTeam(((Component)other).gameObject) == teamFilter.teamIndex && component.bodyIndex == characterBody.bodyIndex && component.skillLocator.primary.stock < 7) { gravitateTarget = ((Component)other).gameObject.transform; } } } private void FixedUpdate() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0057: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)gravitateTarget)) { Rigidbody obj = rb; Vector3 velocity = rb.velocity; Vector3 val = ((Component)gravitateTarget).transform.position - ((Component)this).transform.position; obj.velocity = Vector3.MoveTowards(velocity, ((Vector3)(ref val)).normalized * maxSpeed, acceleration); } } } public class NemHuntressController : MonoBehaviour { public CharacterModel characterModel; public SkillLocator skillLocator; public CharacterBody characterBody; public bool headsetLowered; public bool shouldLowerHeadset = true; public OverlayController overlayController; public GameObject scopeOverlayPrefab; private GenericSkill primary; public GameObject baseArrow; public GameObject currentArrow; public void Awake() { characterBody = ((Component)this).GetComponent(); primary = ((Component)this).GetComponent().primary; } public void Start() { skillLocator = characterBody.skillLocator; currentArrow = baseArrow; primary.stock = 1; } public void FixedUpdate() { if (!Object.op_Implicit((Object)(object)characterBody)) { return; } if (characterBody.outOfCombat) { if (headsetLowered) { RaiseHeadset(); } } else if (!headsetLowered && shouldLowerHeadset) { LowerHeadset(); } } private void OnEnable() { InstanceTracker.Add(this); } private void OnDisable() { InstanceTracker.Remove(this); } public void RaiseHeadset() { if (headsetLowered) { headsetLowered = false; } if (overlayController != null) { HudOverlayManager.RemoveOverlay(overlayController); overlayController = null; } } public void LowerHeadset() { //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) if (!headsetLowered) { headsetLowered = true; } overlayController = HudOverlayManager.AddOverlay(((Component)this).gameObject, new OverlayCreationParams { prefab = scopeOverlayPrefab, childLocatorEntry = "ScopeContainer" }); } } [RequireComponent(typeof(CharacterMaster))] internal class CloneInputBank : NetworkBehaviour { public class CloneOwnership : MonoBehaviour { public CloneInputBank clone; private SkillDef detonateSkillDef; public CharacterBody body; private SkillLocator skillLocator; public int maxRecasts = 1; private int timesRecasted; private float cooldownRefundTimer; private void Awake() { body = ((Component)this).GetComponent(); detonateSkillDef = SS2Assets.LoadAsset("sdCloneDash", SS2Bundle.NemMercenary); if (Object.op_Implicit((Object)(object)body)) { skillLocator = body.skillLocator; skillLocator.special.SetSkillOverride((object)this, detonateSkillDef, (SkillOverridePriority)4); } } public void Reactivate() { clone.OnReactivation(); timesRecasted++; if (timesRecasted >= maxRecasts) { UnsetOverride(); } } public void UnsetOverride() { if (Object.op_Implicit((Object)(object)skillLocator)) { skillLocator.special.UnsetSkillOverride((object)this, detonateSkillDef, (SkillOverridePriority)4); skillLocator.special.RunRecharge(cooldownRefundTimer); } Object.Destroy((Object)(object)this); } private void FixedUpdate() { cooldownRefundTimer += Time.fixedDeltaTime; if (!Object.op_Implicit((Object)(object)clone)) { UnsetOverride(); } } } private NemMercCloneTracker tracker; private InputBankTest ownerInputBank; private InputBankTest inputBank; [NonSerialized] [SyncVar] public GameObject ownerMasterObject; private NetworkUser ownerUser; public CharacterMaster master; public bool copyMovements; public bool copyEquipment; public EntityStateMachine bodyStateMachine; public CharacterBody body; [NonSerialized] public static DeployableSlot deployableSlot = NemMerc.clone; public GameObject indicatorPrefab; [NonSerialized] public int maxRecasts = 1; public NetworkIdentity ownerNetId; private NetworkInstanceId ___ownerMasterObjectNetId; public GameObject NetworkownerMasterObject { get { return ownerMasterObject; } [param: In] set { ((NetworkBehaviour)this).SetSyncVarGameObject(value, ref ownerMasterObject, 1u, ref ___ownerMasterObjectNetId); } } private void Start() { //IL_013d: Unknown result type (might be due to invalid IL or missing references) body = master.GetBody(); if (Object.op_Implicit((Object)(object)body)) { tracker = ((Component)body).GetComponent(); bodyStateMachine = EntityStateMachine.FindByCustomName(((Component)body).gameObject, "Body"); inputBank = body.inputBank; body.teamComponent.RequestDefaultIndicator(indicatorPrefab); } if (!Object.op_Implicit((Object)(object)ownerMasterObject)) { if (!Object.op_Implicit((Object)(object)((Component)master.minionOwnership.ownerMaster).gameObject)) { SS2Log.Error("CloneInputBank has no owner master.", 64, "Start"); Object.Destroy((Object)(object)this); return; } NetworkownerMasterObject = ((Component)master.minionOwnership.ownerMaster).gameObject; } CharacterMaster component = ownerMasterObject.GetComponent(); CharacterBody val = component.GetBody(); if (Object.op_Implicit((Object)(object)val)) { CloneOwnership cloneOwnership = ((Component)val).gameObject.AddComponent(); cloneOwnership.clone = this; cloneOwnership.maxRecasts = maxRecasts; ownerInputBank = val.inputBank; } if (Object.op_Implicit((Object)(object)component.playerCharacterMasterController)) { ownerUser = component.playerCharacterMasterController.networkUser; } if (NetworkServer.active) { component.AddDeployable(((Component)this).GetComponent(), NemMerc.clone); if (Object.op_Implicit((Object)(object)ownerUser)) { ((Component)this).GetComponent().AssignClientAuthority(((NetworkBehaviour)ownerUser).connectionToClient); body.networkIdentity.AssignClientAuthority(((NetworkBehaviour)ownerUser).connectionToClient); } } if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)ownerInputBank)) { AttackerOverrideManager.AddOverride(((Component)body).gameObject, ((Component)ownerInputBank).gameObject); } } private void OnDestroy() { if (Object.op_Implicit((Object)(object)body)) { AttackerOverrideManager.RemoveOverride(((Component)body).gameObject); } } private void AttemptResolveBody() { SS2Log.Info("CloneInputBank: Attempting to resolve clone body"); body = master.GetBody(); if (Object.op_Implicit((Object)(object)body)) { tracker = ((Component)body).GetComponent(); bodyStateMachine = EntityStateMachine.FindByCustomName(((Component)body).gameObject, "Body"); bodyStateMachine.SetNextStateToMain(); inputBank = body.inputBank; body.teamComponent.RequestDefaultIndicator(indicatorPrefab); tracker.ownerTracker = ((Component)ownerInputBank).GetComponent(); SS2Log.Info("CloneInputBank: Clone body resolved!"); } } private void FixedUpdate() { //IL_0051: 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) if (!Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)master) && master.bodyResolved) { AttemptResolveBody(); } if (Object.op_Implicit((Object)(object)inputBank) && Object.op_Implicit((Object)(object)ownerInputBank)) { inputBank.aimDirection = HandleAimDirection(); ((ButtonState)(ref inputBank.skill1)).PushState(ownerInputBank.skill1.down); ((ButtonState)(ref inputBank.skill2)).PushState(ownerInputBank.skill2.down); ((ButtonState)(ref inputBank.skill3)).PushState(ownerInputBank.skill3.down); } else { SS2Log.Error(string.Concat("CloneInputBank: Missing InputBanks! inputBank: ", inputBank, " | ownerInputBank: ", ownerInputBank), 174, "FixedUpdate"); } if (copyMovements) { inputBank.moveVector = ownerInputBank.moveVector; ((ButtonState)(ref inputBank.jump)).PushState(ownerInputBank.jump.down); ((ButtonState)(ref inputBank.sprint)).PushState(ownerInputBank.sprint.down); } if (copyEquipment) { ((ButtonState)(ref inputBank.activateEquipment)).PushState(ownerInputBank.activateEquipment.down); } } public Vector3 HandleAimDirection() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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) if (Object.op_Implicit((Object)(object)tracker)) { GameObject trackingTarget = tracker.GetTrackingTarget(); if (Object.op_Implicit((Object)(object)trackingTarget)) { return trackingTarget.transform.position - inputBank.aimOrigin; } } return ownerInputBank.aimDirection; } public void OnReactivation() { if (Object.op_Implicit((Object)(object)body) && body.healthComponent.alive && Object.op_Implicit((Object)(object)bodyStateMachine)) { bodyStateMachine.SetNextState((EntityState)(object)new CloneDash { target = ((Component)ownerInputBank).gameObject }); } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.Write(ownerMasterObject); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & (true ? 1u : 0u)) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(ownerMasterObject); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { //IL_0008: 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) if (initialState) { ___ownerMasterObjectNetId = reader.ReadNetworkId(); return; } int num = (int)reader.ReadPackedUInt32(); if (((uint)num & (true ? 1u : 0u)) != 0) { ownerMasterObject = reader.ReadGameObject(); } } public override void PreStartClient() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkInstanceId)(ref ___ownerMasterObjectNetId)).IsEmpty()) { NetworkownerMasterObject = ClientScene.FindLocalObject(___ownerMasterObjectNetId); } } } public class NemMercCloneTracker : NemMercTracker { [NonSerialized] public NemMercTracker ownerTracker; public override GameObject GetTrackingTarget() { if (!Object.op_Implicit((Object)(object)ownerTracker) || ownerTracker is NemMercCloneTracker) { return trackingTarget; } return ownerTracker.GetTrackingTarget(); } public override bool IsTargetHologram() { if (!Object.op_Implicit((Object)(object)GetTrackingTarget()) || !Object.op_Implicit((Object)(object)ownerTracker)) { return Object.op_Implicit((Object)(object)trackingTarget); } return ownerTracker.targetIsHologram; } } public class NemMercHologram : NetworkBehaviour { [NonSerialized] public static DeployableSlot deployableSlot = NemMerc.hologram; [NonSerialized] public float lifetime; private GameObject _owner; private HurtBox _target; private bool dirty; public TeamFilter teamFilter; public Transform indicatorStartTransform; public Transform indicatorTransform; public GameObject lineRenderer; public GameObject hologramIndicatorPrefab; public float targetSearchRadius = 25f; public float targetLostDistance = 35f; public float ownerCollisionRadius = 4f; private float searchFrequency = 6f; private float searchStopwatch; private PositionIndicator indicator; private float stopwatch; private bool isRevealed; private SphereSearch search = new SphereSearch(); private EntityStateMachine ownerBodyMachine; private BaseAI ownerAI; public GameObject owner { get { return _owner; } set { if ((Object)(object)value != (Object)(object)_owner) { dirty = true; } _owner = value; } } public HurtBox target { get { return _target; } set { if ((Object)(object)value != (Object)(object)_target) { dirty = true; } _target = value; } } private void Start() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) teamFilter = ((Component)this).GetComponent(); if (!Object.op_Implicit((Object)(object)owner)) { return; } if (ShouldShowIndicator()) { indicator = Object.Instantiate(hologramIndicatorPrefab, ((Component)this).transform.position, Quaternion.identity).GetComponent(); indicator.targetTransform = indicatorStartTransform; } CharacterBody component = owner.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { CharacterMaster master = component.master; if (Object.op_Implicit((Object)(object)master)) { if (NetworkServer.active) { master.AddDeployable(((Component)this).GetComponent(), NemMerc.hologram); } ownerAI = ((Component)component.master).GetComponent(); if (Object.op_Implicit((Object)(object)teamFilter)) { teamFilter.teamIndex = master.teamIndex; } } } ownerBodyMachine = EntityStateMachine.FindByCustomName(owner, "Body"); } private void CheckNewTargetOnDamage(DamageReport damageReport) { //IL_0034: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)damageReport.victim) && Object.op_Implicit((Object)(object)damageReport.attacker) && (Object)(object)damageReport.attacker == (Object)(object)owner && DamageAPI.HasModdedDamageType(damageReport.damageInfo, RedirectHologram.damageType)) { Vector3 val = damageReport.damageInfo.position - ((Component)this).transform.position; if (((Vector3)(ref val)).magnitude <= targetSearchRadius) { target = damageReport.victim.body.mainHurtBox; } } } private void FixedUpdate() { stopwatch += Time.fixedDeltaTime; if (NetworkServer.active && stopwatch >= lifetime) { Object.Destroy((Object)(object)((Component)this).gameObject); } if (OwnerInCollisionRadius() && Object.op_Implicit((Object)(object)ownerBodyMachine) && ownerBodyMachine.SetInterruptState((EntityState)(object)new NemAssaulter { target = target }, (InterruptPriority)3)) { Object.Destroy((Object)(object)((Component)this).gameObject); } if (ShouldUpdateTarget()) { target = null; searchStopwatch -= Time.fixedDeltaTime; if (searchStopwatch <= 0f) { searchStopwatch += 1f / searchFrequency; SearchForTarget(); } } if (Object.op_Implicit((Object)(object)ownerAI) && Object.op_Implicit((Object)(object)target)) { ownerAI.customTarget.gameObject = ((Component)this).gameObject; } if (Object.op_Implicit((Object)(object)indicator)) { indicator.yOffset = 0f; indicator.targetTransform = ((Component)this).transform; } } private bool OwnerInCollisionRadius() { //IL_0018: 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_002d: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)owner)) { Vector3 val = owner.transform.position - ((Component)this).transform.position; return ((Vector3)(ref val)).magnitude <= ownerCollisionRadius; } return false; } private bool ShouldUpdateTarget() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)target)) { return true; } if (!target.healthComponent.alive) { return true; } Vector3 val = ((Component)target).transform.position - ((Component)this).transform.position; if (((Vector3)(ref val)).magnitude > targetLostDistance) { return true; } return false; } private void OnDestroy() { if (Object.op_Implicit((Object)(object)indicator)) { Object.Destroy((Object)(object)((Component)indicator).gameObject); } } public void OnEnable() { GlobalEventManager.onServerDamageDealt += CheckNewTargetOnDamage; } public void OnDisable() { GlobalEventManager.onServerDamageDealt -= CheckNewTargetOnDamage; } public override bool OnSerialize(NetworkWriter writer, bool initialState) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) writer.Write(owner); NetworkExtensions.Write(writer, HurtBoxReference.FromHurtBox(target)); return dirty; } public override void OnDeserialize(NetworkReader reader, bool initialState) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) owner = reader.ReadGameObject(); HurtBoxReference val = NetworkExtensions.ReadHurtBoxReference(reader); target = ((HurtBoxReference)(ref val)).ResolveHurtBox(); } private void SearchForTarget() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: 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) //IL_0065: Unknown result type (might be due to invalid IL or missing references) TeamMask enemyTeams = TeamMask.GetEnemyTeams(TeamComponent.GetObjectTeam(owner)); search.origin = ((Component)this).transform.position; search.radius = targetSearchRadius; search.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; search.queryTriggerInteraction = (QueryTriggerInteraction)1; target = search.RefreshCandidates().FilterCandidatesByHurtBoxTeam(enemyTeams).FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes() .FirstOrDefault(); } private void Update() { UpdateVisualizer(); } private bool ShouldShowIndicator() { return Util.HasEffectiveAuthority(owner); } public void UpdateVisualizer() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) bool flag = Object.op_Implicit((Object)(object)target); if (Object.op_Implicit((Object)(object)target) != lineRenderer.activeSelf) { lineRenderer.SetActive(flag); ((Component)indicatorStartTransform).gameObject.SetActive(flag); } if (flag) { indicatorTransform.position = ((Component)target).transform.position; indicatorStartTransform.position = ((Component)this).transform.position; } } private void UNetVersion() { } public override void PreStartClient() { } } [RequireComponent(typeof(ProjectileStickOnImpact))] internal class NemMercKnifeProjectile : NetworkBehaviour { private ProjectileStickOnImpact projectileStickOnImpact; public float pullDamageCoefficient = 4f; public float pullProcCoefficient = 1f; public float pullRadius = 4.5f; public float pullTimer = 0.67f; private GameObject owner; private GameObject cloneOwner; private TeamFilter teamFilter; private ProjectileController controller; [SyncVar] private bool alive; private bool wasAlive; [SyncVar] private bool bitch; public GameObject pullEffectPrefab; public ParticleSystem[] stickParticleSystem; public GameObject enemyHitEffectPrefab; public GameObject[] stickObject; public GameObject inFlightObject; public bool Networkalive { get { return alive; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref alive, 1u); } } public bool Networkbitch { get { return bitch; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref bitch, 2u); } } private void Awake() { projectileStickOnImpact = ((Component)this).GetComponent(); teamFilter = ((Component)this).GetComponent(); } private void Start() { controller = ((Component)this).GetComponent(); owner = controller.owner; NemMercCloneTracker component = owner.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { cloneOwner = ((Component)component.ownerTracker).gameObject; } } private void FixedUpdate() { //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) if (bitch && !NetworkServer.active && Object.op_Implicit((Object)(object)inFlightObject)) { inFlightObject.SetActive(false); } if (alive && !wasAlive && !NetworkServer.active) { wasAlive = true; if (Object.op_Implicit((Object)(object)inFlightObject)) { inFlightObject.SetActive(false); } ParticleSystem[] array = stickParticleSystem; for (int i = 0; i < array.Length; i++) { array[i].Play(); } GameObject[] array2 = stickObject; for (int j = 0; j < array2.Length; j++) { array2[j].SetActive(true); } } if (!NetworkServer.active) { return; } if (alive) { pullTimer -= Time.fixedDeltaTime; } else { pullTimer = 0.67f; } if (Object.op_Implicit((Object)(object)projectileStickOnImpact)) { bool flag = Object.op_Implicit((Object)(object)projectileStickOnImpact.stuckBody); if (flag && !alive) { TeamMask enemyTeams = TeamMask.GetEnemyTeams(teamFilter.teamIndex); flag = ((TeamMask)(ref enemyTeams)).HasTeam(projectileStickOnImpact.stuckBody.teamComponent.teamIndex); if (flag) { OnEnemyBodyStuck(); } } else if (!flag && alive) { OnEnemyBodyLost(); } Networkalive = flag; } if (alive && pullTimer <= 0f && (CheckPullKnife(owner) || CheckPullKnife(cloneOwner))) { Networkalive = false; PullKnife(); } } public void OnEnemyBodyStuck() { //IL_005b: 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) ParticleSystem[] array = stickParticleSystem; for (int i = 0; i < array.Length; i++) { array[i].Play(); } GameObject[] array2 = stickObject; for (int j = 0; j < array2.Length; j++) { array2[j].SetActive(true); } if (Object.op_Implicit((Object)(object)enemyHitEffectPrefab) && NetworkServer.active) { EffectManager.SimpleEffect(enemyHitEffectPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation, true); } if (Object.op_Implicit((Object)(object)inFlightObject)) { inFlightObject.SetActive(false); } } public void OnEnemyBodyLost() { ParticleSystem[] array = stickParticleSystem; for (int i = 0; i < array.Length; i++) { ((Component)array[i]).gameObject.SetActive(false); } GameObject[] array2 = stickObject; for (int j = 0; j < array2.Length; j++) { array2[j].SetActive(false); } } public bool CheckPullKnife(GameObject candidate) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //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) if (!Object.op_Implicit((Object)(object)candidate)) { return false; } Vector3 val = candidate.transform.position - ((Component)this).transform.position; return ((Vector3)(ref val)).magnitude <= pullRadius; } public void PullKnife() { //IL_0014: 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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: 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_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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Expected O, but got Unknown if (!NetworkServer.active) { return; } EffectManager.SimpleEffect(pullEffectPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation, true); GameObject victim = projectileStickOnImpact.victim; if (Object.op_Implicit((Object)(object)victim)) { HealthComponent component = victim.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { CharacterBody val = (Object.op_Implicit((Object)(object)owner) ? owner.GetComponent() : null); DamageInfo val2 = new DamageInfo { position = ((Component)this).transform.position, attacker = owner, inflictor = owner, damage = pullDamageCoefficient * (Object.op_Implicit((Object)(object)val) ? val.damage : 12f), damageColorIndex = (DamageColorIndex)0, damageType = (DamageType)524288, crit = (Object.op_Implicit((Object)(object)val) && val.RollCrit()), force = Vector3.zero, procChainMask = default(ProcChainMask), procCoefficient = 1f }; component.TakeDamage(val2); GlobalEventManager.instance.OnHitEnemy(val2, ((Component)component).gameObject); GlobalEventManager.instance.OnHitAll(val2, ((Component)component).gameObject); Object.Destroy((Object)(object)((Component)this).gameObject); } } } public void OnProjectileImpact(ProjectileImpactInfo impactInfo) { Networkbitch = true; if (Object.op_Implicit((Object)(object)inFlightObject)) { inFlightObject.SetActive(false); } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.Write(alive); writer.Write(bitch); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & (true ? 1u : 0u)) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(alive); } if ((((NetworkBehaviour)this).syncVarDirtyBits & 2u) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(bitch); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { if (initialState) { alive = reader.ReadBoolean(); bitch = reader.ReadBoolean(); return; } int num = (int)reader.ReadPackedUInt32(); if (((uint)num & (true ? 1u : 0u)) != 0) { alive = reader.ReadBoolean(); } if (((uint)num & 2u) != 0) { bitch = reader.ReadBoolean(); } } public override void PreStartClient() { } } [RequireComponent(typeof(InputBankTest))] [RequireComponent(typeof(CharacterBody))] [RequireComponent(typeof(TeamComponent))] public class NemMercTracker : MonoBehaviour { [NonSerialized] public bool targetIsHologram; public float hologramTrackingDistance = 256f; public float hologramRayRadius = 6f; public float maxTrackingDistance = 50f; public float maxTrackingAngle = 40f; public float trackerUpdateFrequency = 10f; [NonSerialized] public GameObject trackingTarget; [NonSerialized] public CharacterBody characterBody; [NonSerialized] public TeamComponent teamComponent; [NonSerialized] public InputBankTest inputBank; [NonSerialized] public float trackerUpdateStopwatch; [NonSerialized] public Indicator indicator; [NonSerialized] public BullseyeSearch search = new BullseyeSearch(); public void Awake() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown indicator = new Indicator(((Component)this).gameObject, SS2Assets.LoadAsset("NemMercTrackingIndicator", SS2Bundle.NemMercenary)); } public void Start() { characterBody = ((Component)this).GetComponent(); inputBank = ((Component)this).GetComponent(); teamComponent = ((Component)this).GetComponent(); } public virtual GameObject GetTrackingTarget() { return trackingTarget; } public virtual bool IsTargetHologram() { if (Object.op_Implicit((Object)(object)GetTrackingTarget())) { return targetIsHologram; } return false; } public void OnEnable() { indicator.active = true; } public void OnDisable() { indicator.active = false; } public void FixedUpdate() { //IL_0047: 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_005d: Unknown result type (might be due to invalid IL or missing references) trackerUpdateStopwatch += Time.fixedDeltaTime; if (trackerUpdateStopwatch >= 1f / trackerUpdateFrequency) { trackerUpdateStopwatch -= 1f / trackerUpdateFrequency; Ray aimRay = default(Ray); ((Ray)(ref aimRay))..ctor(inputBank.aimOrigin, inputBank.aimDirection); SearchForTarget(aimRay); indicator.targetTransform = (Object.op_Implicit((Object)(object)trackingTarget) ? trackingTarget.transform : null); } } public virtual void SearchForTarget(Ray aimRay) { //IL_0009: 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_0026: 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_0045: 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_00cd: 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_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: 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_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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) targetIsHologram = false; RaycastHit[] array = Physics.SphereCastAll(((Ray)(ref aimRay)).origin, hologramRayRadius, ((Ray)(ref aimRay)).direction, hologramTrackingDistance, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.noCollision)).mask), (QueryTriggerInteraction)2); for (int i = 0; i < array.Length; i++) { RaycastHit val = array[i]; Collider collider = ((RaycastHit)(ref val)).collider; if (!Object.op_Implicit((Object)(object)collider)) { continue; } NemMercHologram component = ((Component)collider).GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.teamFilter) && component.teamFilter.teamIndex == teamComponent.teamIndex) { if ((Object)(object)component.owner == (Object)(object)((Component)this).gameObject) { trackingTarget = ((Component)component).gameObject; targetIsHologram = true; } return; } } TeamMask allButNeutral = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral)).RemoveTeam(teamComponent.teamIndex); search.teamMaskFilter = allButNeutral; search.filterByLoS = true; search.searchOrigin = ((Ray)(ref aimRay)).origin; search.searchDirection = ((Ray)(ref aimRay)).direction; search.sortMode = (SortMode)2; search.maxDistanceFilter = maxTrackingDistance; search.maxAngleFilter = maxTrackingAngle; search.RefreshCandidates(); search.FilterOutGameObject(((Component)this).gameObject); HurtBox val2 = search.GetResults().FirstOrDefault(); trackingTarget = (Object.op_Implicit((Object)(object)val2) ? ((Component)val2).gameObject : null); } } public class NemesisItemDrop : MonoBehaviour, IOnKilledServerReceiver { public ItemDef itemDef; private CharacterBody body; private void Awake() { body = ((Component)this).GetComponent(); } public void OnKilledServer(DamageReport damageReport) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Invalid comparison between Unknown and I4 //IL_0014: 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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) if ((int)itemDef.deprecatedTier != 5) { PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex(itemDef.itemIndex), body.corePosition, Vector3.up); } } } public class NemesisResistances : MonoBehaviour { private CharacterBody body; private void Awake() { body = ((Component)this).GetComponent(); } private void OnEnable() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown FogDamageController.EvaluateTeam += new hook_EvaluateTeam(RemoveSelf); } private void OnDisable() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown FogDamageController.EvaluateTeam -= new hook_EvaluateTeam(RemoveSelf); } private void RemoveSelf(orig_EvaluateTeam orig, FogDamageController self, TeamIndex teamIndex) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, teamIndex); if (Object.op_Implicit((Object)(object)body) && self.characterBodyToStacks.ContainsKey(body)) { self.characterBodyToStacks.Remove(body); } } private void FixedUpdate() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) CharacterBody obj = body; obj.bodyFlags = (BodyFlags)(obj.bodyFlags | 1); } static NemesisResistances() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown HealthComponent.Suicide += new hook_Suicide(ResistVoid); } private static void ResistVoid(orig_Suicide orig, HealthComponent self, GameObject killerOverride, GameObject inflictorOverride, DamageType damageType) { //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Invalid comparison between Unknown and I4 CharacterBody val = self.body; if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.master) && (int)damageType == 65536 && (Object)(object)((Component)val).GetComponent() != (Object)null) { val.SetBodyStateToPreferredInitialState(); switch (Run.instance.runRNG.RangeInt(1, 4)) { case 1: ChatMessage.Send(val.GetDisplayName() + ": Not like that."); break; case 2: ChatMessage.Send(val.GetDisplayName() + ": It's not over yet."); break; case 3: ChatMessage.Send(val.GetDisplayName() + ": Old trick."); break; } } else { orig.Invoke(self, killerOverride, inflictorOverride, damageType); } } private static void TPBack(orig_TryZoneStart orig, MapZone self, Collider other) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Invalid comparison between Unknown and I4 if (Object.op_Implicit((Object)(object)((Component)other).gameObject)) { CharacterBody component = ((Component)other).GetComponent(); if ((Object)(object)((Component)component).GetComponent() != (Object)null) { TeamComponent teamComponent = component.teamComponent; if (Object.op_Implicit((Object)(object)teamComponent) && (int)teamComponent.teamIndex != 1) { teamComponent.teamIndex = (TeamIndex)1; orig.Invoke(self, other); teamComponent.teamIndex = (TeamIndex)2; return; } } } orig.Invoke(self, other); } } public class NemmandoUnlockComponent : MonoBehaviour { private HealthComponent healthComponent; public static event Action OnDeath; private void Awake() { healthComponent = ((Component)this).GetComponent(); } private void FixedUpdate() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Invalid comparison between Unknown and I4 if (Object.op_Implicit((Object)(object)healthComponent) && !healthComponent.alive && (int)healthComponent.body.teamComponent.teamIndex != 1) { NemmandoUnlockComponent.OnDeath?.Invoke(Run.instance); } } static NemmandoUnlockComponent() { NemmandoUnlockComponent.OnDeath = delegate { }; } } public class PriceTooltipManager : NetworkBehaviour { private Transform icon; private Image image; private Sprite sprite; private GameObject zanzan; private TraderController zanzanController; private TooltipProvider tooltip; private ItemDef item; private void Start() { //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) icon = ((Component)this).transform.Find("Icon"); if ((Object)(object)icon == (Object)null) { return; } image = ((Component)icon).GetComponent(); if ((Object)(object)image == (Object)null) { return; } sprite = image.sprite; if ((Object)(object)image == (Object)null) { return; } zanzan = GameObject.Find("TraderBody(Clone)"); zanzanController = zanzan.GetComponent(); if ((Object)(object)zanzanController == (Object)null) { return; } tooltip = ((Component)this).GetComponent(); if (!((Object)(object)tooltip == (Object)null)) { item = zanzanController.GetItemThroughSprite(sprite); if ((Object)(object)item != (Object)null) { Debug.Log((object)("item = " + item)); float num = zanzanController.itemValues[item]; string text = ((num >= 0.82f) ? "SS2_TRADER_QUALITY_BEST" : ((num >= 0.62f) ? "SS2_TRADER_QUALITY_GREAT" : ((num >= 0.33f) ? "SS2_TRADER_QUALITY_GOOD" : ((!(num >= 0.11f)) ? "SS2_TRADER_QUALITY_POOR" : "SS2_TRADER_QUALITY_MODERATE")))); tooltip.titleColor = Color32.op_Implicit(ColorCatalog.GetColor(item.darkColorIndex)); tooltip.titleToken = item.nameToken; string arg = Mathf.Floor(zanzanController.itemValues[item] * 100f).ToString(); string bodyToken = string.Format("{0}{1}{2}", arg, "% - ", Language.GetStringFormatted(text, Array.Empty())); tooltip.bodyToken = bodyToken; } } } private void UNetVersion() { } 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() { } } [RequireComponent(typeof(ProjectileController))] public class ProjectileHealAOE : MonoBehaviour, IProjectileImpactBehavior { public float radius = 12f; public float percentHeal = 0.2f; public float healDamageCoefficient = 1f; public float orbTravelDuration = 0.5f; private ProjectileController projectileController; private TeamFilter teamFilter; private ProjectileDamage projectileDamage; private bool hasFired; private void Awake() { projectileController = ((Component)this).GetComponent(); teamFilter = ((Component)this).GetComponent(); projectileDamage = ((Component)this).GetComponent(); } private void Fire() { //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_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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_00f0: Expected O, but got Unknown //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) hasFired = true; if (!NetworkServer.active) { return; } float num = projectileDamage.damage * healDamageCoefficient; List list = new List(); SphereSearch val = new SphereSearch(); TeamMask val2 = default(TeamMask); ((TeamMask)(ref val2)).AddTeam(teamFilter.teamIndex); val.radius = radius; val.origin = ((Component)this).transform.position; val.queryTriggerInteraction = (QueryTriggerInteraction)2; val.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; val.RefreshCandidates(); val.FilterCandidatesByDistinctHurtBoxEntities().FilterCandidatesByHurtBoxTeam(val2); HurtBox[] hurtBoxes = val.GetHurtBoxes(); for (int i = 0; i < hurtBoxes.Length; i++) { HealthComponent healthComponent = hurtBoxes[i].healthComponent; if (!list.Contains(healthComponent)) { list.Add(healthComponent); } } foreach (HealthComponent item in list) { float healValue = num + item.fullHealth * percentHeal; HealOrb val3 = new HealOrb(); ((Orb)val3).origin = ((Component)this).transform.position; ((Orb)val3).target = item.body.mainHurtBox; val3.healValue = healValue; val3.overrideDuration = orbTravelDuration; OrbManager.instance.AddOrb((Orb)(object)val3); } } public void OnProjectileImpact(ProjectileImpactInfo impactInfo) { if (!hasFired) { Fire(); } } } [RequireComponent(typeof(ProjectileController))] public class ProjectileIgnoreCollisionsFromGrabController : MonoBehaviour { [NonSerialized] public Collider[] collidersToIgnore; private Collider myCollider; private void Start() { //IL_0048: 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) GrabController component = ((Component)this).GetComponent().owner.GetComponent(); myCollider = ((Component)this).GetComponent(); if ((Object.op_Implicit((Object)(object)component) && !Object.op_Implicit((Object)(object)component.victimInfo.body)) || component.victimInfo.body.teamComponent.teamIndex != ((Component)this).GetComponent().teamIndex) { return; } collidersToIgnore = ArrayUtils.Join(component.victimColliders, component.victimInfo.body.hurtBoxGroup.hurtBoxes.Select((HurtBox h) => ((Component)h).GetComponent()).ToArray()); if (!Object.op_Implicit((Object)(object)component)) { return; } Collider[] array = collidersToIgnore; foreach (Collider val in array) { if (Object.op_Implicit((Object)(object)val)) { Physics.IgnoreCollision(myCollider, val, true); } } } } [RequireComponent(typeof(ProjectileController))] public class ProjectileHealAllyOnHit : MonoBehaviour, IProjectileImpactBehavior { [Tooltip("If enabled, heals the ally by % specified in Percent Heal. Otherwise, heal is based on projectile's damage and Heal Coefficient.")] public bool healByPercent = true; public float percentHeal = 5f; public float healCoefficient = 1f; public string healAllySoundString; public bool applyBuff; public BuffDef buffToApply; public float buffDuration = 1f; [Tooltip("Set to 0 to have unlimited buff stacks.")] public int buffMaxStacks; private ProjectileController projectileController; private ProjectileDamage projectileDamage; private TeamIndex projectileTeam; private List hcList = new List(); public void Awake() { projectileController = ((Component)this).gameObject.GetComponent(); projectileDamage = ((Component)this).gameObject.GetComponent(); } public void Start() { //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) projectileTeam = projectileController.teamFilter.teamIndex; } public void OnProjectileImpact(ProjectileImpactInfo impactInfo) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_00ac: Unknown result type (might be due to invalid IL or missing references) Collider collider = impactInfo.collider; if (!Object.op_Implicit((Object)(object)collider)) { return; } HurtBox component = ((Component)collider).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } HealthComponent healthComponent = component.healthComponent; if (!Object.op_Implicit((Object)(object)healthComponent) || !ShouldHealProceed(healthComponent, projectileTeam)) { return; } Util.PlaySound(healAllySoundString, ((Component)this).gameObject); if (!NetworkServer.active) { return; } if (healByPercent) { healthComponent.HealFraction(percentHeal, default(ProcChainMask)); } else if (Object.op_Implicit((Object)(object)projectileDamage)) { healthComponent.Heal(projectileDamage.damage * healCoefficient, default(ProcChainMask), true); } else { Debug.LogWarningFormat((Object)(object)this, "ProjectileHealAllyOnHit {0} no projectile damage component!", new object[1] { this }); } if (applyBuff) { if (!Object.op_Implicit((Object)(object)buffToApply)) { Debug.LogWarningFormat((Object)(object)this, "ProjectileHealAllyOnHit {0} has applyBuff enabled but has no buff specified", new object[1] { this }); return; } if (buffMaxStacks > 0) { healthComponent.body.AddTimedBuff(buffToApply, buffDuration, buffMaxStacks); } else { healthComponent.body.AddTimedBuff(buffToApply, buffDuration); } } hcList.Add(healthComponent); } private bool ShouldHealProceed(HealthComponent target, TeamIndex allyTeam) { //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_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Invalid comparison between Unknown and I4 if (target.body.teamComponent.teamIndex == allyTeam && (Object)(object)((Component)target.body).gameObject != (Object)(object)projectileController.owner.gameObject && (int)target.body.teamComponent.teamIndex != -1) { return !hcList.Contains(target); } return false; } } [RequireComponent(typeof(ProjectileController))] public class ProjectileInflictStackingBuff : MonoBehaviour, IOnDamageInflictedServerReceiver { public BuffDef buffDef; public float buffDuration; public int buffMaxStacks; public void OnDamageInflictedServer(DamageReport damageReport) { CharacterBody victimBody = damageReport.victimBody; if (Object.op_Implicit((Object)(object)victimBody)) { victimBody.AddTimedBuff(buffDef, buffDuration, buffMaxStacks); } } private void OnValidate() { if (!Object.op_Implicit((Object)(object)buffDef)) { Debug.LogWarningFormat((Object)(object)this, "ProjectileInflictStackingBuff {0} has no buff specified.", new object[1] { this }); } } } public class RemunerationChoiceBehavior : NetworkBehaviour { public static GameObject pedestalPrefab; public RemunerationShopBehavior shop; public PurchaseInteraction interaction; [SyncVar] public bool alive; public bool Networkalive { get { return alive; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref alive, 1u); } } [SystemInitializer(new Type[] { })] private static void Init() { pedestalPrefab = SS2Assets.LoadAsset("RemunerationPedestalBase", SS2Bundle.Items); } private void Start() { //IL_003f: 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) interaction = ((Component)this).GetComponent(); ((UnityEvent)(object)interaction.onPurchase).AddListener((UnityAction)OnPurchased); if (Object.op_Implicit((Object)(object)pedestalPrefab)) { Object.Instantiate(pedestalPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation); } if (Object.op_Implicit((Object)(object)shop)) { shop.DiscoverChoice(this); } _ = NetworkServer.active; _ = NetworkClient.active; } public void OnPurchased(Interactor interactor) { shop.OnChoicePicked(this); } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.Write(alive); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & (true ? 1u : 0u)) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(alive); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { if (initialState) { alive = reader.ReadBoolean(); return; } int num = (int)reader.ReadPackedUInt32(); if (((uint)num & (true ? 1u : 0u)) != 0) { alive = reader.ReadBoolean(); } } public override void PreStartClient() { } } public class RemunerationDropletController : NetworkBehaviour { public static GameObject shopOptionPrefab; public static GameObject dropletPrefab; [SyncVar] private bool alive = true; public RemunerationShopBehavior shop; private float stopwatch = 5f; public bool Networkalive { get { return alive; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref alive, 1u); } } [SystemInitializer(new Type[] { })] private static void Init() { dropletPrefab = SS2Assets.LoadAsset("RemunerationDroplet", SS2Bundle.Items); shopOptionPrefab = SS2Assets.LoadAsset("RemunerationPedestal", SS2Bundle.Items); } public void OnCollisionEnter(Collision collision) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && alive) { Networkalive = false; GameObject obj = Object.Instantiate(shopOptionPrefab, ((Component)this).transform.position + Vector3.down, Quaternion.identity); RemunerationChoiceBehavior component = obj.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.shop = shop; } NetworkServer.Spawn(obj); Object.Destroy((Object)(object)((Component)this).gameObject); } } private void FixedUpdate() { stopwatch -= Time.fixedDeltaTime; if (stopwatch <= 0f && Object.op_Implicit((Object)(object)shop)) { shop.FailDroplet(this); Object.Destroy((Object)(object)((Component)this).gameObject); } } private void Start() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) GameObject val = PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex(Items.CloverVoid.itemIndex))?.dropletDisplayPrefab; if (Object.op_Implicit((Object)(object)val)) { Object.Instantiate(val, ((Component)this).transform); } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.Write(alive); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & (true ? 1u : 0u)) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(alive); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { if (initialState) { alive = reader.ReadBoolean(); return; } int num = (int)reader.ReadPackedUInt32(); if (((uint)num & (true ? 1u : 0u)) != 0) { alive = reader.ReadBoolean(); } } public override void PreStartClient() { } } public class RemunerationShopBehavior : NetworkBehaviour { public enum ShopOption { RedItem } public float effectScale = 4.5f; public static GameObject deleteEffectPrefab; public List choices; public int numDrops = 3; public float soundPitch = 1.5f; public int choicesDropped; public CharacterMaster owner; private bool hasFailed; [SystemInitializer(new Type[] { })] private static void Init() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) deleteEffectPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Nullifier/NullifierExplosion.prefab").WaitForCompletion(), "WAWA"); deleteEffectPrefab.GetComponent().soundName = "Play_nullifier_death_vortex_explode"; ContentAddition.AddEffect(deleteEffectPrefab); } private void Start() { choices = new List(); _ = NetworkClient.active; } public void DiscoverChoice(RemunerationChoiceBehavior choice) { choices.Add(choice); if (choices.Count >= numDrops) { OnAllChoicesDiscovered(); } } public void OnAllChoicesDiscovered() { foreach (RemunerationChoiceBehavior choice in choices) { choice.Networkalive = true; choice.interaction.SetAvailable(true); } } public void OnChoicePicked(RemunerationChoiceBehavior choice) { //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_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown Util.PlayAttackSpeedSound("Play_nullifier_death_vortex_explode", ((Component)this).gameObject, soundPitch); foreach (RemunerationChoiceBehavior choice2 in choices) { EffectData val = new EffectData { origin = ((Component)choice2).transform.position + Vector3.up * 3f, rotation = Quaternion.identity, scale = effectScale }; EffectManager.SpawnEffect(deleteEffectPrefab, val, true); Object.Destroy((Object)(object)((Component)choice2).gameObject); } } public void SpawnDroplet(Vector3 position, Vector3 velocity) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0006: 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_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) GameObject obj = Object.Instantiate(RemunerationDropletController.dropletPrefab, position, Quaternion.identity); obj.GetComponent().shop = this; Rigidbody component = obj.GetComponent(); component.velocity = velocity; component.AddTorque(Random.Range(150f, 120f) * Random.onUnitSphere); NetworkServer.Spawn(obj); } public void FailDroplet(RemunerationDropletController droplet) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_005f: Expected O, but got Unknown if (!hasFailed) { hasFailed = true; if (NetworkServer.active) { Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "SS2_ITEM_REMUNERATION_FAILURE" }); OnAllChoicesDiscovered(); EffectData val = new EffectData { origin = ((Component)droplet).transform.position, rotation = Quaternion.identity, scale = effectScale }; EffectManager.SpawnEffect(deleteEffectPrefab, val, true); Object.Destroy((Object)(object)((Component)droplet).gameObject); } } } private void UNetVersion() { } 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 SantaHatPickup : MonoBehaviour, IInteractable { public string GetContextString([NotNull] Interactor activator) { return Language.GetString("SS2_INTERACTABLE_SANTAHAT_CONTEXT"); } public Interactability GetInteractability([NotNull] Interactor activator) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) CharacterBody component = ((Component)activator).GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory) && component.inventory.GetItemCount(SS2Content.Items.SantaHat.itemIndex) == 0) { return (Interactability)2; } return (Interactability)0; } public void OnInteractionBegin([NotNull] Interactor activator) { CharacterBody component = ((Component)activator).GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory)) { component.inventory.GiveItem(SS2Content.Items.SantaHat, 1); NetworkServer.Destroy(((Component)this).gameObject); } } public bool ShouldIgnoreSpherecastForInteractibility([NotNull] Interactor activator) { return true; } public bool ShouldShowOnScanner() { return false; } } public class ShockDroneVFX : NetworkBehaviour { private ModelLocator modelLocator; private GameObject model; private ChildLocator childLocator; private GameObject chargeVFX; private SkillLocator skillLocator; private HealthComponent healthComponent; private bool chargeEnabled; private AkEvent[] droneAkEvents; private void Awake() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) modelLocator = ((Component)this).GetComponent(); model = ((Component)modelLocator.modelTransform).gameObject; childLocator = model.GetComponent(); chargeVFX = ((Component)childLocator.FindChild("ChargeSparks")).gameObject; skillLocator = ((Component)this).GetComponent(); healthComponent = ((Component)this).GetComponent(); GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Drones/Drone1Body.prefab").WaitForCompletion(); droneAkEvents = val.GetComponents(); AkEvent[] array = droneAkEvents; foreach (AkEvent val2 in array) { Type type = ((object)val2).GetType(); Component obj = ((Component)this).gameObject.AddComponent(type); FieldInfo[] fields = type.GetFields(); foreach (FieldInfo obj2 in fields) { object value = obj2.GetValue(val2); obj2.SetValue(obj, value); } } } private void FixedUpdate() { if (skillLocator.primary.stock == 0 || !healthComponent.alive) { chargeVFX.SetActive(false); } else { chargeVFX.SetActive(true); } } private void UNetVersion() { } 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() { } } internal class SoulPickup : MonoBehaviour { public GameObject baseObject; public TeamFilter team; public float chance; public StirringSoul.Behavior Behavior; private bool alive = true; private void FixedUpdate() { if (NetworkServer.active) { chance = Behavior.currentChance; } } private void OnTriggerStay(Collider other) { //IL_001b: 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) if (NetworkServer.active && alive && TeamComponent.GetObjectTeam(((Component)other).gameObject) == team.teamIndex && Object.op_Implicit((Object)(object)((Component)other).GetComponent())) { alive = false; Util.PlaySound("StirringSoul", ((Component)this).gameObject); if (Util.CheckRoll(chance, 0f, (CharacterMaster)null)) { SS2Util.DropShipCall(((Component)this).transform, 1, 5u, 1, (ItemTier)0); Behavior.ChangeChance(reset: true); } else { Behavior.ChangeChance(reset: false); } Object.Destroy((Object)(object)baseObject); } } } public class StupidFuckingCooldownSetter : MonoBehaviour { public int primaryStock; public float primaryStopwatch; public int secondaryStock; public float secondaryStopwatch; public int utilityStock; public float utilityStopwatch; public int specialStock; public float specialStopwatch; private void Start() { CharacterBody component = ((Component)this).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { SS2Log.Error("r u fucking stupid?", 31, "Start"); Object.Destroy((Object)(object)this); return; } component.skillLocator.primary.stock = primaryStock; component.skillLocator.primary.rechargeStopwatch = primaryStopwatch; component.skillLocator.secondary.stock = secondaryStock; component.skillLocator.secondary.rechargeStopwatch = secondaryStopwatch; component.skillLocator.utility.stock = utilityStock; component.skillLocator.utility.rechargeStopwatch = utilityStopwatch; component.skillLocator.special.stock = specialStock; component.skillLocator.special.rechargeStopwatch = specialStopwatch; } } public class TraderController : NetworkBehaviour { public EntityStateMachine esm; public ModelLocator modelLocator; public ChildLocator childLocator; public static GameObject menuPrefab; public PickupPickerController pickupPickerController; private Interactor interactor; public float commonValue = 0.12f; public float uncommonValue = 0.3f; public float rareValue = 0.62f; public float lunarValue = 0.45f; public ItemDef favoriteItem; private LanguageTextMeshController ltmcPrice; private GameObject priceLabel; public Dictionary itemValues = new Dictionary(); public Dictionary itemSprites = new Dictionary(); public ItemIndex lastTradedItemIndex { get; private set; } internal static void Initialize() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) menuPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Scrapper/ScrapperPickerPanel.prefab").WaitForCompletion(); ModifyMenu(menuPrefab); } private void Start() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //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_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: 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_0063: Unknown result type (might be due to invalid IL or missing references) modelLocator = ((Component)this).GetComponent(); childLocator = ((Component)modelLocator.modelTransform).GetComponent(); favoriteItem = FindFavorite(); if (NetworkServer.active) { Debug.Log((object)"yep"); Enumerator enumerator = ItemCatalog.allItemDefs.GetEnumerator(); try { while (enumerator.MoveNext()) { ItemDef current = enumerator.Current; if (Run.instance.IsItemAvailable(current.itemIndex)) { float value = CalcValue(current); itemValues[current] = value; Debug.Log((object)("Value for " + current.nameToken + " is " + itemValues[current])); if ((Object)(object)current == (Object)(object)favoriteItem) { Debug.Log((object)("I ABSOLUTELY FUCKING LOVE " + current.nameToken + " BTW")); } itemSprites[current.pickupIconSprite] = current; } } } finally { ((IDisposable)enumerator).Dispose(); } } if (Object.op_Implicit((Object)(object)pickupPickerController)) { pickupPickerController.panelPrefab = menuPrefab; Transform val = pickupPickerController.panelPrefab.transform.Find("MainPanel").Find("Juice").Find("Label"); priceLabel = Object.Instantiate(((Component)val).gameObject); priceLabel.AddComponent(); RectTransform component = priceLabel.GetComponent(); ((Transform)component).SetPositionAndRotation(new Vector3(((Transform)component).localPosition.x, ((Transform)component).localPosition.y - 45f, ((Transform)component).localPosition.z), ((Transform)component).rotation); if ((Object)(object)val.Find("Label(Clone") == (Object)null) { priceLabel = Object.Instantiate(((Component)val).gameObject); priceLabel.transform.SetParent(val); } else { Debug.Log((object)"pricelabel null, returning"); } } else { Debug.Log((object)"hi"); } } public ItemDef GetItemThroughSprite(Sprite sprite) { return itemSprites[sprite]; } public static GameObject ModifyMenu(GameObject menuPrefab) { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)"MAKING MENU"); Transform obj = menuPrefab.transform.Find("MainPanel").Find("Juice"); Transform val = obj.Find("Label"); LanguageTextMeshController component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null) { component.token = "SS2_TRADER_POPUP_TEXT"; } else { Debug.Log((object)"ltmc null"); } GameObject obj2 = Object.Instantiate(((Component)val).gameObject); obj2.AddComponent(); RectTransform component2 = obj2.GetComponent(); ((Transform)component2).SetPositionAndRotation(new Vector3(((Transform)component2).localPosition.x, ((Transform)component2).localPosition.y - 45f, ((Transform)component2).localPosition.z), ((Transform)component2).rotation); obj2.transform.SetParent(val); Transform obj3 = obj.Find("IconContainer").Find("PickupButtonTemplate"); ((Component)obj3).gameObject.AddComponent(); ((Component)obj3).gameObject.AddComponent(); Debug.Log((object)"MADE MENU"); return menuPrefab; } private unsafe ItemDef FindFavorite() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) int length = ItemCatalog.allItemDefs.Length; int num = Random.Range(0, length); ItemDef val = (ItemDef)Unsafe.Read((void*)ItemCatalog.allItemDefs[num]); if (!Run.instance.IsItemAvailable(val.itemIndex)) { val = Items.BarrierOnOverHeal; } if ((Object)(object)val == (Object)(object)Items.ScrapGreen || (Object)(object)val == (Object)(object)Items.ScrapWhite || (Object)(object)val == (Object)(object)Items.ScrapYellow || (Object)(object)val == (Object)(object)Items.ScrapRed) { val = Items.BarrierOnOverHeal; } return val; } private float CalcValue(ItemDef itemDef) { //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_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected I4, but got Unknown //IL_00ba: 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_00c8: Invalid comparison between Unknown and I4 float num = 0f; ItemTier tier = itemDef.tier; switch (tier - 1) { case 1: case 3: case 7: case 8: num = Random.Range(rareValue * 0.9f, rareValue * 1.3f); break; case 2: num = Random.Range(lunarValue * 0.7f, lunarValue * 1.3f); break; case 0: case 6: num = Random.Range(uncommonValue * 0.7f, uncommonValue * 1.5f); break; default: num = Random.Range(commonValue * 0.7f, commonValue * 1.45f); if ((int)itemDef.tier != 0 && (int)itemDef.tier != 6) { num += 0.65f; } break; } if ((Object)(object)itemDef == (Object)(object)favoriteItem) { num += 0.3f; } if ((Object)(object)itemDef == (Object)(object)Items.ScrapGreen || (Object)(object)itemDef == (Object)(object)Items.ScrapWhite || (Object)(object)itemDef == (Object)(object)Items.ScrapYellow || (Object)(object)itemDef == (Object)(object)Items.ScrapRed) { num *= 0.2f; } if ((Object)(object)itemDef == (Object)(object)Items.BarrierOnOverHeal && (Object)(object)favoriteItem != (Object)(object)Items.BarrierOnOverHeal) { num -= 0.2f; } return num; } private void Update() { } [Server] public void AssignPotentialInteractor(Interactor potentialInteractor) { if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void Moonstorm.Starstorm2.Components.TraderController::AssignPotentialInteractor(RoR2.Interactor)' called on client"); return; } if (!NetworkServer.active) { Debug.Log((object)"THIS MF IS A CLIENT LOL @ TraderController AssignPotentialInteractor"); return; } Debug.Log((object)"hello!"); interactor = potentialInteractor; } [Server] public void BeginTrade(int intPickupIndex) { //IL_001e: 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_006d: 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_0085: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void Moonstorm.Starstorm2.Components.TraderController::BeginTrade(System.Int32)' called on client"); } else { if (!NetworkServer.active) { return; } PickupDef pickupDef = PickupCatalog.GetPickupDef(new PickupIndex(intPickupIndex)); if (pickupDef != null && Object.op_Implicit((Object)(object)interactor)) { lastTradedItemIndex = pickupDef.itemIndex; CharacterBody component = ((Component)interactor).GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory)) { component.inventory.RemoveItem(pickupDef.itemIndex, 1); CreateItemTakenOrb(component.corePosition, ((Component)this).gameObject, pickupDef.itemIndex); } } if (Object.op_Implicit((Object)(object)esm)) { esm.SetNextState((EntityState)(object)new WaitToBeginTrade()); } } } public float GetValue(ItemDef itemDef) { return itemValues[itemDef]; } public void ReduceValue() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) itemValues[ItemCatalog.GetItemDef(lastTradedItemIndex)] *= 0.8f; } [Server] public static void CreateItemTakenOrb(Vector3 effectOrigin, GameObject targetObject, ItemIndex itemIndex) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0051: 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_0059: Expected I4, but got Unknown //IL_005a: Expected O, but got Unknown if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void Moonstorm.Starstorm2.Components.TraderController::CreateItemTakenOrb(UnityEngine.Vector3,UnityEngine.GameObject,RoR2.ItemIndex)' called on client"); return; } if (!NetworkServer.active) { Debug.Log((object)"client client client @ TraderController CreateItemTakenOrb"); return; } GameObject obj = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/ItemTakenOrbEffect.prefab").WaitForCompletion(); EffectData val = new EffectData { origin = effectOrigin, genericFloat = 1.5f, genericUInt = (uint)(itemIndex + 1) }; val.SetNetworkedObjectReference(targetObject); EffectManager.SpawnEffect(obj, val, true); } private void UNetVersion() { } public override void OnDeserialize(NetworkReader reader, bool initialState) { } public override void PreStartClient() { } } public class AddressablePrefab : MonoBehaviour { public string AssetPath; private GameObject instance; public bool _refreshInEditor; public GameObject GetInstance() { return instance; } private void OnEnable() { Refresh(); } private void OnDisable() { if (Object.op_Implicit((Object)(object)instance)) { Object.Destroy((Object)(object)instance); } } private void OnValidate() { if (_refreshInEditor) { Refresh(); } } private void Refresh() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)instance)) { Object.Destroy((Object)(object)instance); } instance = Object.Instantiate(Addressables.LoadAssetAsync((object)AssetPath).WaitForCompletion(), ((Component)this).gameObject.transform); ((Object)instance).hideFlags = (HideFlags)4; } } [ExecuteAlways] public class AddressablesAsset : MonoBehaviour { public string Key; private Object _asset; [SerializeField] private Component _targetComponent; [SerializeField] private string _targetMemberInfoName; private void Awake() { Refresh(); } public void Refresh() { //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) _asset = Addressables.LoadAssetAsync((object)Key).WaitForCompletion(); if (!Object.op_Implicit(_asset)) { Debug.LogError((object)("AddressablesAsset failed loading " + Key)); return; } if (!Object.op_Implicit((Object)(object)_targetComponent)) { Debug.LogError((object)"AddressablesAsset failed _targetComponent"); return; } if (string.IsNullOrWhiteSpace(_targetMemberInfoName)) { Debug.LogError((object)"AddressablesAsset failed IsNullOrWhiteSpace _targetMemberInfoName"); return; } MemberInfo memberInfo = (from m in ((object)_targetComponent).GetType().GetMembers(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy) where m.GetType().Name == "MonoProperty" || m.GetType().Name == "MonoField" || m.GetType().Name == "FieldInfo" || m.GetType().Name == "PropertyInfo" select m).FirstOrDefault((MemberInfo m) => "(" + m.DeclaringType.Name + ") " + m.Name == _targetMemberInfoName); if (memberInfo == null) { Debug.LogError((object)$"AddressablesAsset failed finding targetMemberInfo based on name {_targetMemberInfoName}. Target Component {_targetComponent}"); return; } memberInfo.GetType(); if (memberInfo is FieldInfo fieldInfo) { fieldInfo.SetValue(_targetComponent, _asset); } else if (memberInfo is PropertyInfo propertyInfo) { propertyInfo.SetValue(_targetComponent, _asset); } Debug.Log((object)$"Success setting {_targetComponent}::{_targetMemberInfoName}"); } } public class CalculateAreaUnderCurve : MonoBehaviour { public AnimationCurve curve; public Vector2 range; public int steps; public void OnEnable() { float num = (range.y - range.x) / (float)steps; float num2 = 0f; for (int i = 0; i < steps; i++) { num2 += curve.Evaluate(num * (float)i) * num; } float num3 = 0f; for (int num4 = steps; num4 > 0; num4--) { num3 += curve.Evaluate(num * (float)num4) * num; } Debug.Log((object)$"Area under curve is {(num2 + num3) / 2f}"); } } public class ComponentLogger : MonoBehaviour { private void Awake() { Debug.Log((object)(((Object)this).name + ".Awake()")); } private void OnDestroy() { Debug.Log((object)(((Object)this).name + ".OnDestroy()")); } private void OnEnable() { Debug.Log((object)(((Object)this).name + ".OnEnable()")); } private void OnDisable() { Debug.Log((object)(((Object)this).name + ".OnDisable()")); } } public class CreateAnimationCurve : MonoBehaviour { [Serializable] public struct AnimationKeyframe { public float time; public float value; public float inTangent; public float outTangent; public float inWeight; public float outWeight; public WeightedMode weightedMode; public int tangentMode; public Keyframe GetKeyframe() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) return new Keyframe(time, value, inTangent, outTangent, inWeight, outWeight); } } public AnimationCurve outputCurve; public AnimationKeyframe[] keyframes; private void Start() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown outputCurve = new AnimationCurve(keyframes.Select((AnimationKeyframe keyframe) => keyframe.GetKeyframe()).ToArray()); } } public class SendChatMessage : MonoBehaviour { public void SendMessage(string baskeToken, string message) { string[] message2 = new string[1] { message }; SendMessage(baskeToken, message2); } public void SendMessage(string baseToken, string[] message) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = baseToken, paramTokens = message }); } } } namespace Moonstorm.Starstorm2.ScriptableObjects { [CreateAssetMenu(menuName = "Starstorm2/SkillDef/DuplexSkillDef")] public class DuplexSkillDef : SkillDef { public class InstanceData : BaseSkillInstanceData { public int currentStock; public float graceStopwatch; } [Header("Reload Parameters")] [Tooltip("The reload state to go into, when stock is less than max.")] public SerializableEntityStateType reloadState; [Tooltip("The priority of this reload state.")] public InterruptPriority reloadInterruptPriority = (InterruptPriority)1; [Tooltip("The amount of time to wait between when we COULD reload, and when we actually start")] public float graceDuration; [Tooltip("How much attack speed effects the grace duration")] public float graceAttackSpeedCoefficient = 0.5f; public override BaseSkillInstanceData OnAssigned([NotNull] GenericSkill skillSlot) { return (BaseSkillInstanceData)(object)new InstanceData(); } public override void OnFixedUpdate([NotNull] GenericSkill skillSlot) { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) ((SkillDef)this).OnFixedUpdate(skillSlot); if (!skillSlot.characterBody.inputBank.skill1.down && skillSlot.stock % 2 == 1 && skillSlot.CanExecute()) { skillSlot.ExecuteIfReady(); } InstanceData instanceData = (InstanceData)(object)skillSlot.skillInstanceData; instanceData.currentStock = skillSlot.stock; if (instanceData.currentStock != 0) { return; } if (Object.op_Implicit((Object)(object)skillSlot.stateMachine) && !skillSlot.stateMachine.HasPendingState() && skillSlot.stateMachine.CanInterruptState(reloadInterruptPriority)) { instanceData.graceStopwatch += Time.fixedDeltaTime; float num = (skillSlot.characterBody.attackSpeed - 1f) * graceAttackSpeedCoefficient + 1f; if (instanceData.graceStopwatch >= graceDuration / num) { skillSlot.stateMachine.SetNextState(EntityStateCatalog.InstantiateState(reloadState)); } } else { instanceData.graceStopwatch = 0f; } } } [CreateAssetMenu(menuName = "Starstorm2/SkillDef/ShadowStepSkillDef")] public class ShadowStepSkillDef : SkillDef { public class InstanceData : BaseSkillInstanceData { public NemMercTracker tracker; } public Sprite hologramOverrideIcon; public SerializableEntityStateType hologramOverrideState; public string hologramOverrideStateMachine = "Body"; public override BaseSkillInstanceData OnAssigned([NotNull] GenericSkill skillSlot) { return (BaseSkillInstanceData)(object)new InstanceData { tracker = ((Component)skillSlot).GetComponent() }; } public override void OnExecute([NotNull] GenericSkill skillSlot) { //IL_0046: 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) EntityStateMachine val = EntityStateMachine.FindByCustomName(((Component)skillSlot).gameObject, hologramOverrideStateMachine); if (Object.op_Implicit((Object)(object)val) && TargetIsHologram(skillSlot)) { val.SetInterruptState(((SkillDef)this).InstantiateNextState(skillSlot), base.interruptPriority); } else { skillSlot.stateMachine.SetInterruptState(((SkillDef)this).InstantiateNextState(skillSlot), base.interruptPriority); } if (base.cancelSprintingOnActivation) { skillSlot.characterBody.isSprinting = false; } skillSlot.stock -= base.stockToConsume; if (base.resetCooldownTimerOnUse) { skillSlot.rechargeStopwatch = 0f; } if (Object.op_Implicit((Object)(object)skillSlot.characterBody)) { skillSlot.characterBody.OnSkillActivated(skillSlot); } if (TargetIsHologram(skillSlot)) { skillSlot.stock += base.stockToConsume; } } public override EntityState InstantiateNextState([NotNull] GenericSkill skillSlot) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) EntityState obj = EntityStateCatalog.InstantiateState(TargetIsHologram(skillSlot) ? hologramOverrideState : base.activationState); ISkillState val; if ((val = (ISkillState)(object)((obj is ISkillState) ? obj : null)) != null) { val.activatorSkillSlot = skillSlot; } return obj; } public override Sprite GetCurrentIcon([NotNull] GenericSkill skillSlot) { if (!TargetIsHologram(skillSlot)) { return ((SkillDef)this).GetCurrentIcon(skillSlot); } return hologramOverrideIcon; } public static bool HasTarget([NotNull] GenericSkill skillSlot) { NemMercTracker tracker = ((InstanceData)(object)skillSlot.skillInstanceData).tracker; return Object.op_Implicit((Object)(object)(((Object)(object)tracker != (Object)null) ? tracker.GetTrackingTarget() : null)); } public static bool TargetIsHologram([NotNull] GenericSkill skillSlot) { NemMercTracker tracker = ((InstanceData)(object)skillSlot.skillInstanceData).tracker; if (!((Object)(object)tracker != (Object)null)) { return false; } return tracker.IsTargetHologram(); } public override bool CanExecute([NotNull] GenericSkill skillSlot) { if (!HasTarget(skillSlot) || !((SkillDef)this).CanExecute(skillSlot)) { return TargetIsHologram(skillSlot); } return true; } public override bool IsReady([NotNull] GenericSkill skillSlot) { if (!HasTarget(skillSlot) || !((SkillDef)this).IsReady(skillSlot)) { return TargetIsHologram(skillSlot); } return true; } } [CreateAssetMenu(menuName = "Starstorm2/SkillDef/ChirrTrackingSkillDef")] public class ChirrTrackingSkillDef : SkillDef { public class InstanceData : BaseSkillInstanceData { public ChirrFriendTracker tracker; } public bool isScepter; public override BaseSkillInstanceData OnAssigned([NotNull] GenericSkill skillSlot) { ChirrFriendTracker component = ((Component)skillSlot).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.isScepter = isScepter; } return (BaseSkillInstanceData)(object)new InstanceData { tracker = component }; } public static bool HasTarget([NotNull] GenericSkill skillSlot) { ChirrFriendTracker tracker = ((InstanceData)(object)skillSlot.skillInstanceData).tracker; return Object.op_Implicit((Object)(object)(((Object)(object)tracker != (Object)null) ? tracker.GetTrackingTarget() : null)); } public override bool CanExecute([NotNull] GenericSkill skillSlot) { if (HasTarget(skillSlot)) { return ((SkillDef)this).CanExecute(skillSlot); } return false; } public override bool IsReady([NotNull] GenericSkill skillSlot) { if (HasTarget(skillSlot)) { return ((SkillDef)this).IsReady(skillSlot); } return false; } } [CreateAssetMenu(fileName = "NemesisInventory", menuName = "Starstorm2/NemesisInventory")] public class NemesisInventory : ScriptableObject { [Serializable] public struct NemesisAddressableItemReference { public AddressableItemDef itemDef; public float weight; public int maxStacks; public int minStacks; public NemesisAddressableItemReference(ItemDef itemDef, int maxStacks, int minStacks, float weight) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown this.itemDef = new AddressableItemDef(itemDef); this.maxStacks = maxStacks; this.minStacks = minStacks; this.weight = weight; } public NemesisAddressableItemReference(string itemDefName, int maxStacks, int minStacks, float weight) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown itemDef = new AddressableItemDef(itemDefName); this.maxStacks = maxStacks; this.minStacks = minStacks; this.weight = weight; } } public List nemesisInventory = new List(); internal WeightedSelection nemesisInventorySelection = new WeightedSelection(8); private static List instances = new List(); private void Awake() { if (!instances.Contains(this)) { instances.Add(this); } } private void OnDestroy() { if (instances.Contains(this)) { instances.Remove(this); } } [SystemInitializer(new Type[] { })] private static void Initialize() { AddressableAsset.OnAddressableAssetsLoaded = (Action)Delegate.Combine(AddressableAsset.OnAddressableAssetsLoaded, new Action(InitializeNemesisInventories)); static void InitializeNemesisInventories() { foreach (NemesisInventory instance in instances) { instance.CreateWeightedSelection(); } } } public void GiveItems(Inventory inv) { //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active || !Object.op_Implicit((Object)(object)Run.instance)) { return; } inv.GiveItem(Items.TeleportWhenOob, 1); float num = 0.5f; float num2 = 0.2f; int num3 = (int)((float)(int)Math.Round(Run.instance.GetRunStopwatch() / 60f) * num * Run.instance.difficultyCoefficient); num3 += (int)((float)num3 * Random.Range(0f - num2, num2)); for (int i = 0; i < num3; i++) { NemesisAddressableItemReference nemesisAddressableItemReference = nemesisInventorySelection.Evaluate(Run.instance.runRNG.nextNormalizedFloat); if (Object.op_Implicit((Object)(object)((AddressableAsset)(object)nemesisAddressableItemReference.itemDef).Asset.requiredExpansion) && !Run.instance.IsExpansionEnabled(((AddressableAsset)(object)nemesisAddressableItemReference.itemDef).Asset.requiredExpansion)) { i--; } else if (inv.GetItemCount(((AddressableAsset)(object)nemesisAddressableItemReference.itemDef).Asset) == 0) { inv.GiveItem(((AddressableAsset)(object)nemesisAddressableItemReference.itemDef).Asset, Random.Range(nemesisAddressableItemReference.minStacks, nemesisAddressableItemReference.maxStacks)); } } List list = new List(); foreach (ItemIndex item in inv.itemAcquisitionOrder) { list.Add($"{inv.GetItemCount(item)}x {((Object)ItemCatalog.GetItemDef(item)).name}"); } SS2Log.Debug(string.Format("Given the following items to {0}:\n{1}", ((Component)inv).gameObject, string.Join("\n", list)), 78, "GiveItems"); } private void CreateWeightedSelection() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0045: 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_004d: Unknown result type (might be due to invalid IL or missing references) foreach (NemesisAddressableItemReference item in nemesisInventory) { if (Object.op_Implicit((Object)(object)((AddressableAsset)(object)item.itemDef).Asset)) { ChoiceInfo val = default(ChoiceInfo); val.weight = item.weight; val.value = item; ChoiceInfo val2 = val; nemesisInventorySelection.AddChoice(val2); } } } } [CreateAssetMenu(fileName = "NemesisSpawnCard", menuName = "Starstorm2/NemesisSpawnCard")] public class NemesisSpawnCard : CharacterSpawnCard { [Serializable] public struct SkillOverride { public SkillSlot skillSlot; public SkillDef skillDef; public SkillOverride(SkillSlot skillSlot, SkillDef skillDef) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) this.skillSlot = skillSlot; this.skillDef = skillDef; } } [Serializable] public struct StatModifier { public string fieldName; public StatModifierType statModifierType; public float modifier; public StatModifier(StatModifierType type, float modifier, string fieldName) { statModifierType = type; this.modifier = modifier; this.fieldName = fieldName; } } public enum StatModifierType { Multiplicative, Additive, Override } public class SyncBaseStats : INetMessage, ISerializableObject { private NetworkInstanceId bodyNetId; private float maxHealth; private float regen; private float maxShield; private float movementSpeed; private float acceleration; private float jumpPower; private float damage; private float attackSpeed; private float crit; private float armor; private float visionDistance; private int jumpCount; public void Serialize(NetworkWriter writer) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) writer.Write(bodyNetId); writer.Write(maxHealth); writer.Write(regen); writer.Write(maxShield); writer.Write(movementSpeed); writer.Write(acceleration); writer.Write(jumpPower); writer.Write(damage); writer.Write(attackSpeed); writer.Write(crit); writer.Write(armor); writer.Write(visionDistance); writer.Write(jumpCount); } public void Deserialize(NetworkReader reader) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) bodyNetId = reader.ReadNetworkId(); maxHealth = reader.ReadSingle(); regen = reader.ReadSingle(); maxShield = reader.ReadSingle(); movementSpeed = reader.ReadSingle(); acceleration = reader.ReadSingle(); jumpPower = reader.ReadSingle(); damage = reader.ReadSingle(); attackSpeed = reader.ReadSingle(); crit = reader.ReadSingle(); armor = reader.ReadSingle(); visionDistance = reader.ReadSingle(); jumpCount = reader.ReadInt32(); } public void OnReceived() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { GameObject val = Util.FindNetworkObject(bodyNetId); if (!Object.op_Implicit((Object)(object)val)) { SS2Log.Warning($"{typeof(SyncBaseStats).FullName}: Could not retrieve GameObject with network ID {bodyNetId}"); } CharacterBody component = val.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { SS2Log.Warning($"{typeof(SyncBaseStats).FullName}: Retrieved GameObject {val} but the GameObject does not have a CharacterBody"); return; } component.baseMaxHealth = maxHealth; component.baseRegen = regen; component.baseMaxShield = maxShield; component.baseMoveSpeed = movementSpeed; component.baseAcceleration = acceleration; component.baseJumpPower = jumpPower; component.baseDamage = damage; component.baseAttackSpeed = attackSpeed; component.baseCrit = crit; component.baseArmor = armor; component.baseVisionDistance = visionDistance; component.baseJumpCount = jumpCount; component.PerformAutoCalculateLevelStats(); SS2Log.Info($"Synced base stats of {component}"); } } public SyncBaseStats() { } public SyncBaseStats(CharacterBody body) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) NetworkIdentity component = ((Component)body).GetComponent(); bodyNetId = component.netId; maxHealth = body.baseMaxHealth; regen = body.baseRegen; maxShield = body.baseMaxShield; movementSpeed = body.baseMoveSpeed; acceleration = body.baseAcceleration; jumpPower = body.baseJumpPower; damage = body.baseDamage; attackSpeed = body.baseAttackSpeed; crit = body.baseCrit; armor = body.baseArmor; visionDistance = body.baseVisionDistance; jumpCount = body.baseJumpCount; } } public NemesisInventory nemesisInventory; public bool useOverrideState; public SerializableEntityStateType overrideSpawnState = new SerializableEntityStateType(typeof(Idle)); public StatModifier[] statModifiers; public SkillOverride[] skillOverrides; public GameObject visualEffect; public string childName; public ItemDef itemDef; public override void Spawn(Vector3 position, Quaternion rotation, DirectorSpawnRequest directorSpawnRequest, ref SpawnResult result) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002b: 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: 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_0171: Expected O, but got Unknown //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Expected O, but got Unknown CharacterMaster val = new MasterSummon { masterPrefab = ((SpawnCard)this).prefab, position = position, rotation = rotation, summonerBodyObject = directorSpawnRequest.summonerBodyObject, teamIndexOverride = directorSpawnRequest.teamIndexOverride, ignoreTeamMemberLimit = directorSpawnRequest.ignoreTeamMemberLimit, useAmbientLevel = true }.Perform(); result.spawnedInstance = (((Object)(object)val != (Object)null) ? ((Component)val).gameObject : null); result.success = Object.op_Implicit((Object)(object)result.spawnedInstance); if (!result.success) { return; } CharacterMaster component = result.spawnedInstance.GetComponent(); CharacterBody body = component.GetBody(); nemesisInventory.GiveItems(component.inventory); ((Component)body).gameObject.AddComponent().itemDef = itemDef; ModifyCharacterBody(body); SkillLocator skillLocator = body.skillLocator; SkillOverride[] array = skillOverrides; for (int i = 0; i < array.Length; i++) { SkillOverride skillOverride = array[i]; skillLocator.GetSkill(skillOverride.skillSlot).SetSkillOverride((object)this, skillOverride.skillDef, (SkillOverridePriority)3); } ChildLocator component2 = ((Component)body.modelLocator.modelTransform).GetComponent(); GameObject effect = Object.Instantiate(visualEffect, body.corePosition, Quaternion.identity, component2.FindChild(childName)); component.onBodyDeath.AddListener(new UnityAction(RemoveEffect)); if (useOverrideState) { EntityStateMachine val2 = EntityStateMachine.FindByCustomName(((Component)body).gameObject, "Body"); if (!Object.op_Implicit((Object)(object)val2)) { Debug.LogError((object)$"Error: override Entity State on Nemesis Spawn Card {this} must play on a Body State Machine. Skipping override."); return; } EntityState nextState = (EntityState)Activator.CreateInstance(((SerializableEntityStateType)(ref overrideSpawnState)).stateType); val2.SetNextState(nextState); } void RemoveEffect() { Object.Destroy((Object)(object)effect); } } private void ModifyCharacterBody(CharacterBody characterBody) { characterBody.isChampion = true; StatModifier[] array = statModifiers; for (int i = 0; i < array.Length; i++) { StatModifier statModifier = array[i]; if (GetField(statModifier.fieldName, out var field)) { float num = (float)field.GetValue(characterBody); switch (statModifier.statModifierType) { case StatModifierType.Additive: num += statModifier.modifier; break; case StatModifierType.Multiplicative: num *= statModifier.modifier; break; case StatModifierType.Override: num = statModifier.modifier; break; } field.SetValue(characterBody, num); } } characterBody.PerformAutoCalculateLevelStats(); } private bool GetField(string fieldName, out FieldInfo field) { field = typeof(CharacterBody).GetField(fieldName); if (field == null) { Debug.LogError((object)("Error: " + fieldName + " in Nemesis Spawn Card " + ((Object)this).name + " is not a valid field for a CharacterBody")); return false; } return true; } private void OnValidate() { StatModifier[] array = statModifiers; for (int i = 0; i < array.Length; i++) { StatModifier statModifier = array[i]; GetField(statModifier.fieldName, out var _); } } } } namespace Moonstorm.Starstorm2.API { public class SS2DebugUtil : MonoBehaviour { private void Update() { //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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) bool keyDown = Input.GetKeyDown((KeyCode)278); bool keyDown2 = Input.GetKeyDown((KeyCode)280); bool keyDown3 = Input.GetKeyDown((KeyCode)127); if (keyDown) { InputBankTest component = PlayerCharacterMasterController.instances[0].master.GetBodyObject().GetComponent(); Vector3 val = component.aimOrigin + component.aimDirection * 5f; Object.Instantiate(SS2Assets.LoadAsset("Center", SS2Bundle.All), val, Quaternion.identity); } } } }