Decompiled source of TTGL Mod v0.5.3
TTGL/TTGL_Survivor.dll
Decompiled 2 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.Commando; using EntityStates.Commando.CommandoWeapon; using EntityStates.GoldGat; using EntityStates.Huntress; using EntityStates.Huntress.HuntressWeapon; using EntityStates.Loader; using EntityStates.Merc; using EntityStates.VagrantMonster; using ExtraSkillSlots; using HG; using HG.BlendableTypes; using IL.RoR2; using JetBrains.Annotations; using KinematicCharacterController; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; using On.RoR2; using On.RoR2.UI; using R2API; using R2API.Utils; using RideMeExtended; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.ContentManagement; using RoR2.Hologram; using RoR2.Navigation; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.SurvivorMannequins; using RoR2.UI; using SkillsPlusPlus; using SkillsPlusPlus.Modifiers; using TTGL_Survivor.Modules; using TTGL_Survivor.Modules.Components; using TTGL_Survivor.Modules.Survivors; using TTGL_Survivor.Orbs; using TTGL_Survivor.RideMeExtendedAddin; using TTGL_Survivor.SkillStates; using TTGL_Survivor.UI; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Animations; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")] [assembly: AssemblyCompany("TTGL_Survivor")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("TTGL_Survivor")] [assembly: AssemblyTitle("TTGL_Survivor")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] internal class SkillDefInfo { public string skillName; public string skillNameToken; public string skillDescriptionToken; public Sprite skillIcon; public SerializableEntityStateType activationState; public string activationStateMachineName; public int baseMaxStock; public float baseRechargeInterval; public bool beginSkillCooldownOnSkillEnd; public bool canceledFromSprinting; public bool forceSprintDuringState; public bool fullRestockOnAssign; public InterruptPriority interruptPriority; public bool isBullets; public bool isCombatSkill; public bool mustKeyPress; public bool noSprint; public int rechargeStock; public int requiredStock; public float shootDelay; public int stockToConsume; public string[] keywordTokens; } public class CustomRendererInfo { internal string childName; internal Material material; internal bool ignoreOverlays; } namespace RoR2.Projectile { [RequireComponent(typeof(ProjectileController))] public class GurrenLagannShadesProjectile : NetworkBehaviour, IProjectileImpactBehavior { public bool canConstrict; public float travelSpeed = 40f; public float transitionDuration = 1f; private float maxFlyStopwatch = 2f; public float maxFlyBackStopwatch = 2f; public GameObject impactSpark; public GameObject crosshairPrefab; public bool canHitWorld; private ProjectileController projectileController; [SyncVar] public int boomerangState; private Transform ownerTransform; private Transform returnTarget; private Rigidbody rigidbody; private HitBoxGroup hitBoxGroup; private float stopwatch; private bool hasHitBoss; public int NetworkboomerangState { get { return boomerangState; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar<int>(value, ref boomerangState, 1u); } } private void Start() { rigidbody = ((Component)this).GetComponent<Rigidbody>(); hitBoxGroup = ((Component)this).GetComponent<HitBoxGroup>(); projectileController = ((Component)this).GetComponent<ProjectileController>(); if (!Object.op_Implicit((Object)(object)projectileController) || !Object.op_Implicit((Object)(object)projectileController.owner)) { return; } ownerTransform = projectileController.owner.transform; EntityStateMachine component = ((Component)ownerTransform).GetComponent<EntityStateMachine>(); if (Object.op_Implicit((Object)(object)component)) { ChildLocator componentInChildren = ((Component)component.commonComponents.modelLocator.modelTransform).GetComponentInChildren<ChildLocator>(); if (Object.op_Implicit((Object)(object)componentInChildren)) { returnTarget = componentInChildren.FindChild("HurtboxChest"); } } } public void OnProjectileImpact(ProjectileImpactInfo impactInfo) { //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_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) if (canHitWorld) { if (NetworkboomerangState != 2) { stopwatch = 0f; NetworkboomerangState = 2; OnFlyBack(); } EffectManager.SimpleImpactEffect(impactSpark, impactInfo.estimatedPointOfImpact, -((Component)this).transform.forward, true); } } private void OnFlyBack() { ProjectileOverlapAttack component = ((Component)this).gameObject.GetComponent<ProjectileOverlapAttack>(); if (Object.op_Implicit((Object)(object)component)) { component.ResetOverlapAttack(); } } private bool Reel() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_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_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) if (Object.op_Implicit((Object)(object)returnTarget)) { Vector3 val = returnTarget.position - ((Component)this).transform.position; return ((Vector3)(ref val)).magnitude <= 2f; } if (Object.op_Implicit((Object)(object)projectileController.owner)) { Vector3 val2 = projectileController.owner.transform.position - ((Component)this).transform.position; return ((Vector3)(ref val2)).magnitude <= 2f; } return true; } public void FixedUpdate() { //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_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_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_00df: 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_00e6: 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_0143: 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) if (!Object.op_Implicit((Object)(object)projectileController.owner)) { if (NetworkServer.active) { Object.Destroy((Object)(object)((Component)this).gameObject); } return; } switch (boomerangState) { default: return; case 0: rigidbody.velocity = travelSpeed * ((Component)this).transform.forward; stopwatch += Time.deltaTime; if (stopwatch >= maxFlyStopwatch) { stopwatch = 0f; NetworkboomerangState = 1; return; } break; case 1: { stopwatch += Time.deltaTime; float num2 = stopwatch / transitionDuration; Vector3 val2 = CalculatePullDirection(); rigidbody.velocity = Vector3.Lerp(travelSpeed * ((Component)this).transform.forward, travelSpeed * val2, num2); if (num2 >= 1f) { stopwatch = 0f; NetworkboomerangState = 2; OnFlyBack(); return; } break; } case 2: { stopwatch += Time.deltaTime; bool num = Reel(); canHitWorld = false; Vector3 val = CalculatePullDirection(); rigidbody.velocity = travelSpeed * val; if ((num || stopwatch >= maxFlyBackStopwatch) && NetworkServer.active) { Object.Destroy((Object)(object)((Component)this).gameObject); } break; } } if (NetworkServer.active) { StunLockBoss(); } } private void StunLockBoss() { //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_0039: 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_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_0051: 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) if (!canConstrict || hasHitBoss) { return; } HitBox[] hitBoxes = hitBoxGroup.hitBoxes; for (int i = 0; i < hitBoxes.Length; i++) { Transform transform = ((Component)hitBoxes[i]).transform; Vector3 position = transform.position; Vector3 val = transform.lossyScale * 0.5f; Quaternion rotation = transform.rotation; Collider[] array = Physics.OverlapBox(position, val, rotation, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)); for (int j = 0; j < array.Length; j++) { HurtBox component = ((Component)array[j]).GetComponent<HurtBox>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.healthComponent) && Object.op_Implicit((Object)(object)component.healthComponent.body) && (Object)(object)component.healthComponent.body.teamComponent != (Object)null && component.healthComponent.body.isBoss) { hasHitBoss = true; ConstrictBoss(component.healthComponent.body); Object.Destroy((Object)(object)((Component)this).gameObject); break; } } if (hasHitBoss) { break; } } } private Vector3 CalculatePullDirection() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002b: 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_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_0068: 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) Vector3 val; if (Object.op_Implicit((Object)(object)returnTarget)) { val = returnTarget.position - ((Component)this).transform.position; return ((Vector3)(ref val)).normalized; } if (Object.op_Implicit((Object)(object)projectileController.owner)) { val = projectileController.owner.transform.position - ((Component)this).transform.position; return ((Vector3)(ref val)).normalized; } return ((Component)this).transform.forward; } private void ConstrictBoss(CharacterBody bossBody) { //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) GurrenLagannShadesConstrictComponent componentInChildren = ((Component)bossBody).GetComponentInChildren<GurrenLagannShadesConstrictComponent>(); if (!Object.op_Implicit((Object)(object)componentInChildren) || componentInChildren.visualState == 1) { GameObject obj = Object.Instantiate<GameObject>(TemporaryVisualEffects.gurrenLagannShadesBindingEffect, bossBody.corePosition, Quaternion.identity); GurrenLagannShadesConstrictComponent component = obj.GetComponent<GurrenLagannShadesConstrictComponent>(); component.duration = 8f; component.parentTransform = bossBody.transform; obj.transform.SetParent(bossBody.transform); } else { componentInChildren.durationCounter = 0f; } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.Write(boomerangState); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & (true ? 1u : 0u)) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(boomerangState); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { if (initialState) { boomerangState = reader.ReadInt32(); } else if ((reader.ReadPackedUInt32() & (true ? 1u : 0u)) != 0) { boomerangState = reader.ReadInt32(); } } } } namespace TTGL_Survivor { [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.*/)] [BepInPlugin("com.Mico27.TTGL_Survivor", "TTGL_Survivor", "0.5.1")] [R2APISubmoduleDependency(new string[] { "PrefabAPI", "LanguageAPI", "SoundAPI" })] public class TTGL_SurvivorPlugin : BaseUnityPlugin, IContentPackProvider { public const string MODNAME = "TTGL_Survivor"; public const string MODAUTHOR = "Mico27"; public const string MODUID = "com.Mico27.TTGL_Survivor"; public const string MODVERSION = "0.5.1"; public const string developerPrefix = "MICO27"; public static bool scepterInstalled = false; public static bool skillPlusInstalled = false; public static bool rideMeExtendedInstalled = false; public static TTGL_SurvivorPlugin instance; private SpiralPowerGauge m_SpiralPowerGauge; public ContentPack contentPack = new ContentPack(); internal static List<BuffDef> buffDefs = new List<BuffDef>(); internal static List<SurvivorDef> survivorDefinitions = new List<SurvivorDef>(); internal static List<GameObject> bodyPrefabs = new List<GameObject>(); internal static List<GameObject> masterPrefabs = new List<GameObject>(); internal static List<GameObject> networkPrefabs = new List<GameObject>(); internal static List<GameObject> projectilePrefabs = new List<GameObject>(); internal static List<EffectDef> effectDefs = new List<EffectDef>(); internal static List<NetworkSoundEventDef> networkSoundEventDefs = new List<NetworkSoundEventDef>(); internal static List<SkillFamily> skillFamilies = new List<SkillFamily>(); internal static List<SkillDef> skillDefs = new List<SkillDef>(); internal static List<Type> entityStates = new List<Type>(); internal static List<UnlockableDef> unlockableDefs = new List<UnlockableDef>(); internal static List<SceneDef> sceneDefs = new List<SceneDef>(); public string identifier => "com.Mico27.TTGL_Survivor"; public ManualLogSource Logger => ((BaseUnityPlugin)this).Logger; public void Awake() { instance = this; try { if (Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter")) { scepterInstalled = true; } if (Chainloader.PluginInfos.ContainsKey("com.cwmlolzlz.skills")) { skillPlusInstalled = true; } if (Chainloader.PluginInfos.ContainsKey("com.Mico27.RideMeExtended")) { rideMeExtendedInstalled = true; } TTGLAssets.PopulateAssets(); Config.ReadConfig(); ItemDisplays.PopulateDisplays(); States.RegisterStates(); Buffs.RegisterBuffs(); Projectiles.RegisterProjectiles(); TemporaryVisualEffects.RegisterTemporaryVisualEffects(); Unlockables.AddUnlockables(); new Lagann().CreateCharacter(); new Gurren().CreateCharacter(); new GurrenLagann().CreateCharacter(); CostTypeDefs.RegisterCostTypeDefs(); Interactables.RegisterInteractables(); Tokens.AddTokens(); Hooks(); if (skillPlusInstalled) { AddSkillPlus(); } if (rideMeExtendedInstalled) { AddRideMeExtended(); } } catch (Exception ex) { Logger.LogError((object)(ex.Message + " - " + ex.StackTrace)); } } private void LateSetup(ReadOnlyArray<ReadOnlyContentPack> obj) { Lagann.SetItemDisplays(); Gurren.SetItemDisplays(); GurrenLagann.SetItemDisplays(); } public void OnDestroy() { try { UnHooks(); } catch (Exception ex) { Logger.LogError((object)(ex.Message + " - " + ex.StackTrace)); } } private void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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_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 ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders); ContentManager.onContentPacksAssigned += LateSetup; HUD.Awake += new hook_Awake(HUD_Awake); HUD.onHudTargetChangedGlobal += HUD_onHudTargetChangedGlobal; PickupPickerController.FixedUpdateServer += new hook_FixedUpdateServer(PickupPickerController_FixedUpdateServer); GenericSkill.Start += new hook_Start(GenericSkill_Start); Run.onRunStartGlobal += Run_onRunStartGlobal; } private void GenericSkill_Start(orig_Start orig, GenericSkill self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self.skillDef) && !self.skillDef.fullRestockOnAssign) { self.RemoveAllStocks(); } } private void UnHooks() { //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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown ContentManager.collectContentPackProviders -= new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders); HUD.Awake -= new hook_Awake(HUD_Awake); HUD.onHudTargetChangedGlobal -= HUD_onHudTargetChangedGlobal; PickupPickerController.FixedUpdateServer -= new hook_FixedUpdateServer(PickupPickerController_FixedUpdateServer); } private void HUD_Awake(orig_Awake orig, HUD self) { CreateSpiralPowerGauge(self); orig.Invoke(self); } private void HUD_onHudTargetChangedGlobal(HUD obj) { if (Object.op_Implicit((Object)(object)obj) && Object.op_Implicit((Object)(object)obj.targetBodyObject) && Object.op_Implicit((Object)(object)m_SpiralPowerGauge)) { SpiralEnergyComponent component = obj.targetBodyObject.GetComponent<SpiralEnergyComponent>(); if ((Object)(object)component != (Object)null) { ((Component)m_SpiralPowerGauge).gameObject.SetActive(true); m_SpiralPowerGauge.source = component; } else { ((Component)m_SpiralPowerGauge).gameObject.SetActive(false); m_SpiralPowerGauge.source = null; } } } private void CreateSpiralPowerGauge(HUD hud) { //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_00a7: 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_00bd: 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) if (!Object.op_Implicit((Object)(object)m_SpiralPowerGauge) && Config.spiralGaugeEnabled && (Object)(object)hud != (Object)null && (Object)(object)hud.mainUIPanel != (Object)null) { m_SpiralPowerGauge = hud.mainUIPanel.GetComponentInChildren<SpiralPowerGauge>(); if (!Object.op_Implicit((Object)(object)m_SpiralPowerGauge)) { GameObject val = Object.Instantiate<GameObject>(TTGLAssets.LoadAsset<GameObject>("SpiralPowerPanel")); m_SpiralPowerGauge = val.AddComponent<SpiralPowerGauge>(); val.transform.SetParent(hud.mainUIPanel.transform); RectTransform component = val.GetComponent<RectTransform>(); component.anchorMin = Config.spiralGaugeAnchorMin; component.anchorMax = Config.spiralGaugeAnchorMax; component.pivot = Config.spiralGaugePivot; component.sizeDelta = Config.spiralGaugeSizeDelta; component.anchoredPosition = Config.spiralGaugeAnchoredPosition; ((Transform)component).localScale = Config.spiralGaugeLocalScale; val.SetActive(false); } } } private void PickupPickerController_FixedUpdateServer(orig_FixedUpdateServer orig, PickupPickerController self) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) CharacterMaster currentParticipantMaster = self.networkUIPromptController.currentParticipantMaster; if (!Object.op_Implicit((Object)(object)currentParticipantMaster)) { return; } CharacterBody body = currentParticipantMaster.GetBody(); Interactor val = (Object.op_Implicit((Object)(object)body) ? ((Component)body).GetComponent<Interactor>() : null); if (Object.op_Implicit((Object)(object)body)) { Vector3 val2 = body.inputBank.aimOrigin - ((Component)self).transform.position; if (!((double)((Vector3)(ref val2)).sqrMagnitude > (Object.op_Implicit((Object)(object)val) ? Math.Pow(val.maxInteractionDistance + self.cutoffDistance, 2.0) : ((double)(self.cutoffDistance * self.cutoffDistance))))) { return; } } self.networkUIPromptController.SetParticipantMaster((CharacterMaster)null); } private static void Run_onRunStartGlobal(Run obj) { LagannCombine.playedCutSceneOnce = false; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void AddSkillPlus() { SkillModifierManager.LoadSkillModifiers(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void AddRideMeExtended() { TTGL_Survivor.RideMeExtendedAddin.RideMeExtendedAddin.AddRideMeExtended(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void ExpulseAnyRider(GameObject gameObject) { TTGL_Survivor.RideMeExtendedAddin.RideMeExtendedAddin.ExpulseAnyRider(gameObject); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void ExitSeat(GameObject gameObject) { TTGL_Survivor.RideMeExtendedAddin.RideMeExtendedAddin.ExitSeat(gameObject); } private static string GetSpiralPowerRate(CharacterBody body) { string result = null; SpiralEnergyComponent component = ((Component)body).GetComponent<SpiralEnergyComponent>(); if ((Object)(object)component != (Object)null) { return (component.charge_rate * 300f).ToString("0.##"); } return result; } private static string GetSpiralPowerAmount(CharacterBody body) { string result = null; SpiralEnergyComponent component = ((Component)body).GetComponent<SpiralEnergyComponent>(); if ((Object)(object)component != (Object)null) { return component.energy.ToString("0.##"); } return result; } private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)this); } public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { contentPack.identifier = identifier; contentPack.bodyPrefabs.Add(bodyPrefabs.ToArray()); contentPack.buffDefs.Add(buffDefs.ToArray()); contentPack.effectDefs.Add(effectDefs.ToArray()); contentPack.entityStateTypes.Add(entityStates.ToArray()); contentPack.masterPrefabs.Add(masterPrefabs.ToArray()); contentPack.networkedObjectPrefabs.Add(networkPrefabs.ToArray()); contentPack.networkSoundEventDefs.Add(networkSoundEventDefs.ToArray()); contentPack.projectilePrefabs.Add(projectilePrefabs.ToArray()); contentPack.skillDefs.Add(skillDefs.ToArray()); contentPack.skillFamilies.Add(skillFamilies.ToArray()); contentPack.survivorDefs.Add(survivorDefinitions.ToArray()); contentPack.unlockableDefs.Add(unlockableDefs.ToArray()); contentPack.sceneDefs.Add(sceneDefs.ToArray()); args.ReportProgress(1f); yield break; } public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { ContentPack.Copy(contentPack, args.output); args.ReportProgress(1f); yield break; } public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { args.ReportProgress(1f); yield break; } } } namespace TTGL_Survivor.SkillStates { public class BaseSpiralConversion : BaseSkillState { public static float conversionSpeed = 0.05f; public static float conversionRatio = 0.6f; protected SpiralEnergyComponent spiralEnergyComponent; protected GameObject chargeEffect; protected uint chargeLoopSFX; protected float initialEnergy; protected float previousEnergy; public override void OnEnter() { ((BaseState)this).OnEnter(); spiralEnergyComponent = ((EntityState)this).GetComponent<SpiralEnergyComponent>(); Util.PlaySound(BaseChargeFist.enterSFXString, ((EntityState)this).gameObject); chargeLoopSFX = Util.PlaySound(BaseChargeFist.startChargeLoopSFXString, ((EntityState)this).gameObject); PlayEnterAnimation(); CreateChargeEffect(); HealthComponent healthComponent = ((EntityState)this).healthComponent; initialEnergy = healthComponent.barrier + healthComponent.shield; previousEnergy = initialEnergy; if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } } public override void FixedUpdate() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); HealthComponent healthComponent = ((EntityState)this).healthComponent; float num = healthComponent.barrier + healthComponent.shield; float num2 = ((initialEnergy > 0f) ? Mathf.Clamp01((initialEnergy - num) / initialEnergy) : 0f); AkSoundEngine.SetRTPCValueByPlayingID("loaderShift_chargeAmount", num2 * 100f, chargeLoopSFX); if (NetworkServer.active && Object.op_Implicit((Object)(object)spiralEnergyComponent) && ((EntityState)this).healthComponent.fullCombinedHealth > 0f) { if (num < previousEnergy) { CorrectSpiralEnergy(previousEnergy - num); } if (num > 0f) { ConvertSpiralEnergy(); } } if (((EntityState)this).isAuthority && (num <= 0f || !((BaseSkillState)this).IsKeyDownAuthority())) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } Util.PlaySound(BaseChargeFist.endChargeLoopSFXString, ((EntityState)this).gameObject); DestroyChargeEffect(); PlayExitAnimation(); ((EntityState)this).OnExit(); } protected virtual void PlayEnterAnimation() { ((EntityState)this).PlayAnimation("FullBody, Override", "GurrenLagannSpiralConversion"); } protected virtual void PlayExitAnimation() { ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); } protected virtual void CreateChargeEffect() { chargeEffect = Object.Instantiate<GameObject>(TTGLAssets.LoadAsset<GameObject>("SpiralSlowCharge"), ((EntityState)this).characterBody.coreTransform); } protected virtual void DestroyChargeEffect() { EntityState.Destroy((Object)(object)chargeEffect); } private void CorrectSpiralEnergy(float missingEnergy) { float num = missingEnergy / ((EntityState)this).healthComponent.fullCombinedHealth; spiralEnergyComponent.AddSpiralEnergy(num * conversionRatio); } private void ConvertSpiralEnergy() { //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_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_00f5: Expected O, but got Unknown HealthComponent healthComponent = ((EntityState)this).healthComponent; float num = healthComponent.fullCombinedHealth * conversionSpeed * Time.deltaTime; float num2 = num; if (num > 0f && healthComponent.barrier > 0f) { if (num <= healthComponent.barrier) { healthComponent.Networkbarrier = healthComponent.barrier - num; num = 0f; } else { num -= healthComponent.barrier; healthComponent.Networkbarrier = 0f; } } if (num > 0f && healthComponent.shield > 0f) { if (num <= healthComponent.shield) { healthComponent.Networkshield = healthComponent.shield - num; num = 0f; } else { num -= healthComponent.shield; healthComponent.Networkshield = 0f; float scale = 1f; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { scale = ((EntityState)this).characterBody.radius; } EffectManager.SpawnEffect(AssetReferences.shieldBreakEffectPrefab, new EffectData { origin = ((EntityState)this).transform.position, scale = scale }, true); } } previousEnergy = healthComponent.barrier + healthComponent.shield; float num3 = (num2 - Mathf.Max(num, 0f)) / ((EntityState)this).healthComponent.fullCombinedHealth; spiralEnergyComponent.AddSpiralEnergy(num3 * 300f * conversionRatio); spiralEnergyComponent.energyUptimeStopwatch = 5f; ((EntityState)this).characterBody.outOfDangerStopwatch = 0f; } } public class GurrenDrillBlaster : BaseSkillState { public const float damageCoefficient = 0.5f; public const float procCoefficient = 0.5f; public const float maxDuration = 3f; private Animator animator; private ChildLocator childLocator; private List<Tuple<string, Transform>> muzzles; public float totalStopwatch; private float stopwatch; private float fireFrequency; private uint loopSoundID; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); animator.SetBool("isFiring", true); childLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)childLocator)) { muzzles = new List<Tuple<string, Transform>>(); muzzles.Add(new Tuple<string, Transform>("DrillMuzzle1", childLocator.FindChild("DrillMuzzle1"))); muzzles.Add(new Tuple<string, Transform>("DrillMuzzle2", childLocator.FindChild("DrillMuzzle2"))); muzzles.Add(new Tuple<string, Transform>("DrillMuzzle3", childLocator.FindChild("DrillMuzzle3"))); muzzles.Add(new Tuple<string, Transform>("DrillMuzzle4", childLocator.FindChild("DrillMuzzle4"))); } loopSoundID = Util.PlaySound(GoldGatFire.windUpSoundString, ((EntityState)this).gameObject); FireBullet(); } private void FireBullet() { //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_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_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_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) //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_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_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0126: 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_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_015f: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).StartAimMode(2f, false); float num = Mathf.Clamp01(totalStopwatch / GoldGatFire.windUpDuration); fireFrequency = Mathf.Lerp(GoldGatFire.minFireFrequency, GoldGatFire.maxFireFrequency, num) * ((BaseState)this).attackSpeedStat; float maxSpread = Mathf.Lerp(GoldGatFire.minSpread, GoldGatFire.maxSpread, num); Util.PlaySound(FirePistol2.firePistolSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)animator)) { animator.SetFloat("skill2.playbackRate", fireFrequency); } foreach (Tuple<string, Transform> muzzle in muzzles) { if (((EntityState)this).isAuthority) { new BulletAttack { owner = ((EntityState)this).gameObject, aimVector = ((EntityState)this).inputBank.aimDirection, origin = muzzle.Item2.position, falloffModel = (FalloffModel)1, force = FirePistol2.force, damage = ((BaseState)this).damageStat * 0.5f, damageColorIndex = (DamageColorIndex)3, bulletCount = 1u, minSpread = 0f, maxSpread = maxSpread, radius = 2f, tracerEffectPrefab = FirePistol2.tracerEffectPrefab, hitEffectPrefab = FirePistol2.hitEffectPrefab, isCrit = ((BaseState)this).RollCrit(), procCoefficient = 0.5f, muzzleName = muzzle.Item1, weapon = ((EntityState)this).gameObject }.Fire(); } EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzle.Item1, false); } } public override void FixedUpdate() { //IL_0050: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); totalStopwatch += Time.deltaTime; stopwatch += Time.deltaTime; AkSoundEngine.SetRTPCValueByPlayingID(GoldGatFire.windUpRTPC, Mathf.InverseLerp(GoldGatFire.minFireFrequency, GoldGatFire.maxFireFrequency, fireFrequency) * 100f, loopSoundID); if (stopwatch > 1f / fireFrequency) { stopwatch = 0f; FireBullet(); } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= 3f) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { animator.SetBool("isFiring", false); AkSoundEngine.StopPlayingID(loopSoundID); ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class GurrenEntering : BaseState { public const float duration = 6.1f; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).PlayAnimation("Body", "GURREN_Interact_Activate"); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= 6.1f) { ((EntityState)this).outer.SetNextStateToMain(); } } } public class GurrenLagannGigaDrillBreak : BaseSkillState { public static float damageCoefficient = 1000000f; public static float radius = 1000000f; public static int explosionCount = 2; public static float explosionInterval = 2f; public static string soundString = "TTGLGigaDrillBreak"; public static float procCoefficient = 1000000f; protected Animator animator; protected CharacterBody gigaDrillBreakTarget; private float duration; private float durationBeforeExplosion; private int explosionIndex; private Vector3 previousPosition; private Vector3 previousTargetPosition; private Vector3 specialMovePosition; private Transform specialMoveTargetPosition; private Transform specialMoveCameraSource; private SkippableCamera forcedCamera; private bool fired; private uint currentSound; public override void OnEnter() { //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_00fa: 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) //IL_0118: 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_014a: 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_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0173: 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_01b3: 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) ((BaseState)this).OnEnter(); if (TTGL_SurvivorPlugin.rideMeExtendedInstalled) { TTGL_SurvivorPlugin.ExpulseAnyRider(((EntityState)this).gameObject); } fired = false; animator = ((EntityState)this).GetModelAnimator(); explosionIndex = 0; duration = 22.5f; durationBeforeExplosion = 16f; GurrenLagannController component = ((Component)((EntityState)this).characterBody).GetComponent<GurrenLagannController>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.gigaDrillBreakTarget)) { gigaDrillBreakTarget = ((Component)component.gigaDrillBreakTarget).GetComponent<CharacterBody>(); ConstrictBoss(gigaDrillBreakTarget); } ((EntityState)this).PlayAnimation("FullBody, Override", "GurrenLagannGigaDrillBreak", "skill4.playbackRate", duration, 0f); if (CameraRigController.IsObjectSpectatedByAnyCamera(((EntityState)this).gameObject)) { currentSound = Util.PlaySound(soundString, ((EntityState)this).gameObject); } AllowOutOfBound(enabled: true); SetAntiGravity(((EntityState)this).characterBody, enabled: true); previousPosition = ((Component)((BaseCharacterController)((EntityState)this).characterMotor).Motor).transform.position; specialMovePosition = previousPosition + new Vector3(50000f, 0f, 0f); SetPosition(((EntityState)this).gameObject, specialMovePosition); if (Object.op_Implicit((Object)(object)gigaDrillBreakTarget)) { Vector3 val = gigaDrillBreakTarget.transform.position - ((EntityState)this).characterDirection.targetTransform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; ((EntityState)this).characterDirection.forward = normalized; SetAntiGravity(gigaDrillBreakTarget, enabled: true); previousTargetPosition = gigaDrillBreakTarget.transform.position; SetPosition(((Component)gigaDrillBreakTarget).gameObject, gigaDrillBreakTarget.transform.position + new Vector3(50000f, 0f, 0f)); } ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator)) { specialMoveTargetPosition = modelChildLocator.FindChild("SpecialMoveTargetPosition"); specialMoveCameraSource = modelChildLocator.FindChild("SpecialMoveCameraSource"); forcedCamera = ((Component)specialMoveCameraSource).GetComponent<SkippableCamera>(); } UpdateCameraOverride(); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } } public override void FixedUpdate() { //IL_000e: 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_005f: 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).FixedUpdate(); SetPosition(((EntityState)this).gameObject, specialMovePosition); UpdateCameraOverride(); if (explosionIndex < explosionCount && ((EntityState)this).fixedAge >= durationBeforeExplosion) { Explode(Object.op_Implicit((Object)(object)gigaDrillBreakTarget) ? gigaDrillBreakTarget.transform.position : ((EntityState)this).transform.position); durationBeforeExplosion += explosionInterval; explosionIndex++; } if (Object.op_Implicit((Object)(object)specialMoveTargetPosition) && Object.op_Implicit((Object)(object)gigaDrillBreakTarget)) { SetPosition(((Component)gigaDrillBreakTarget).gameObject, specialMoveTargetPosition.position); } if (((EntityState)this).isAuthority && (((EntityState)this).fixedAge >= duration || (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && ((EntityState)this).inputBank.interact.down))) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0015: 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_007e: 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_0098: 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_00d5: Unknown result type (might be due to invalid IL or missing references) AllowOutOfBound(enabled: false); DisableCameraOverride(); SetPosition(((EntityState)this).gameObject, previousPosition); SetAntiGravity(((EntityState)this).characterBody, enabled: false); if (Object.op_Implicit((Object)(object)gigaDrillBreakTarget)) { SetPosition(((Component)gigaDrillBreakTarget).gameObject, previousTargetPosition); SetAntiGravity(gigaDrillBreakTarget, enabled: false); } ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); if (!fired) { explosionIndex = 0; _ = previousTargetPosition; Explode(previousTargetPosition); explosionIndex = 1; _ = previousTargetPosition; Explode(previousTargetPosition); } if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } if (currentSound != 0) { AkSoundEngine.StopPlayingID(currentSound); } TransformToLagann(previousPosition); ((EntityState)this).OnExit(); } private void Explode(Vector3 target) { //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_0013: 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_002a: Expected O, but got Unknown //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_005d: 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_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_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_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_00a9: 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) if (explosionIndex == 0) { EffectManager.SpawnEffect(TTGLAssets.specialExplosion, new EffectData { origin = target, scale = 1f }, false); return; } fired = true; if (NetworkServer.active) { new BlastAttack { damageType = DamageTypeCombo.op_Implicit((DamageType)262162), attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject), baseDamage = ((BaseState)this).damageStat * damageCoefficient, procCoefficient = procCoefficient, baseForce = ExplosionAttack.force, position = target, radius = radius, falloffModel = (FalloffModel)0, attackerFiltering = (AttackerFiltering)2 }.Fire(); } } private void ConstrictBoss(CharacterBody bossBody) { //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) if (Object.op_Implicit((Object)(object)bossBody)) { GurrenLagannShadesConstrictComponent componentInChildren = ((Component)bossBody).GetComponentInChildren<GurrenLagannShadesConstrictComponent>(); if (!Object.op_Implicit((Object)(object)componentInChildren) || componentInChildren.visualState == 1) { GameObject obj = Object.Instantiate<GameObject>(TemporaryVisualEffects.gurrenLagannShadesBindingEffect, bossBody.corePosition, Quaternion.identity); GurrenLagannShadesConstrictComponent component = obj.GetComponent<GurrenLagannShadesConstrictComponent>(); component.duration = duration; component.parentTransform = bossBody.transform; obj.transform.SetParent(bossBody.transform); } else { componentInChildren.durationCounter = 0f; componentInChildren.duration = duration; } } } private void UnConstrictBoss(CharacterBody bossBody) { if (Object.op_Implicit((Object)(object)bossBody)) { GurrenLagannShadesConstrictComponent componentInChildren = ((Component)bossBody).GetComponentInChildren<GurrenLagannShadesConstrictComponent>(); if (Object.op_Implicit((Object)(object)componentInChildren) && componentInChildren.visualState == 0) { componentInChildren.durationCounter = 0f; componentInChildren.duration = 0f; } } } private void SetAntiGravity(CharacterBody character, bool enabled) { //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_0039: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)character) && Object.op_Implicit((Object)(object)character.characterMotor)) { CharacterGravityParameters gravityParameters = character.characterMotor.gravityParameters; gravityParameters.channeledAntiGravityGranterCount += (enabled ? 1 : (-1)); character.characterMotor.gravityParameters = gravityParameters; } } private void AllowOutOfBound(bool enabled) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown if (enabled) { MapZone.TryZoneStart += new hook_TryZoneStart(MapZone_TryZoneStart); return; } MapZone.TryZoneStart -= new hook_TryZoneStart(MapZone_TryZoneStart); Collider component = ((Component)((EntityState)this).characterBody).GetComponent<Collider>(); if (Object.op_Implicit((Object)(object)component)) { MapZone.collidersToCheckInFixedUpdate.Enqueue(component); } if (Object.op_Implicit((Object)(object)gigaDrillBreakTarget)) { Collider component2 = ((Component)gigaDrillBreakTarget).GetComponent<Collider>(); if (Object.op_Implicit((Object)(object)component2)) { MapZone.collidersToCheckInFixedUpdate.Enqueue(component2); } } } private void MapZone_TryZoneStart(orig_TryZoneStart orig, MapZone self, Collider other) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) CharacterBody component = ((Component)other).GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component) && ((Object)(object)component == (Object)(object)gigaDrillBreakTarget || (Object)(object)component == (Object)(object)((EntityState)this).characterBody)) { self.queuedCollisions.Add(new CollisionInfo(self, other)); } else { orig.Invoke(self, other); } } private void SetPosition(GameObject character, Vector3 newPosition) { //IL_008f: 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_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_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_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_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_007e: Unknown result type (might be due to invalid IL or missing references) CharacterMotor component = character.GetComponent<CharacterMotor>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)((BaseCharacterController)component).Motor)) { ((BaseCharacterController)component).Motor.SetPosition(newPosition, true); ((BaseCharacterController)component).Motor.BaseVelocity = Vector3.zero; component.velocity = Vector3.zero; component.rootMotion = Vector3.zero; return; } RigidbodyMotor component2 = character.GetComponent<RigidbodyMotor>(); if (Object.op_Implicit((Object)(object)component2) && Object.op_Implicit((Object)(object)component2.rigid)) { component2.rigid.MovePosition(newPosition); component2.rootMotion = Vector3.zero; } else { ((EntityState)this).gameObject.transform.position = newPosition; } } private void UpdateCameraOverride() { if (Object.op_Implicit((Object)(object)specialMoveCameraSource) && Object.op_Implicit((Object)(object)forcedCamera)) { if (CameraRigController.IsObjectSpectatedByAnyCamera(((EntityState)this).gameObject)) { ((Component)specialMoveCameraSource).gameObject.SetActive(true); forcedCamera.allowUserControl = ((EntityState)this).isAuthority; } else { ((Component)specialMoveCameraSource).gameObject.SetActive(false); } } } private void DisableCameraOverride() { if (Object.op_Implicit((Object)(object)specialMoveCameraSource)) { ((Component)specialMoveCameraSource).gameObject.SetActive(false); } } private void TransformToLagann(Vector3 newPosition) { //IL_003f: 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_0030: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound(BaseBeginArrowBarrage.blinkSoundString, ((EntityState)this).gameObject); CharacterMaster master = ((EntityState)this).characterBody.master; if (NetworkServer.active) { master.TransformBody("LagannBody"); SpawnGurren(newPosition); } GameObject bodyObject = master.GetBodyObject(); Popup(bodyObject, newPosition + Vector3.up * 5f); } private void SpawnGurren(Vector3 newPosition) { //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_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_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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_0065: 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) float num = 0f; new MasterSummon { masterPrefab = Gurren.allyPrefab, position = newPosition + Vector3.up * num, rotation = ((EntityState)this).characterBody.transform.rotation, summonerBodyObject = (((Object)(object)((EntityState)this).characterBody != (Object)null) ? ((Component)((EntityState)this).characterBody).gameObject : null), ignoreTeamMemberLimit = true, useAmbientLevel = true, inventoryToCopy = ((EntityState)this).characterBody.inventory }.Perform(); } private void Popup(GameObject character, Vector3 newPosition) { //IL_0008: 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_0060: 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_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_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) if (Object.op_Implicit((Object)(object)character)) { Vector3 val = Vector3.up * 20f; CharacterMotor component = character.GetComponent<CharacterMotor>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)((BaseCharacterController)component).Motor)) { ((BaseCharacterController)component).Motor.SetPosition(newPosition, true); ((BaseCharacterController)component).Motor.BaseVelocity = val; component.velocity = val; } else { ((EntityState)this).gameObject.transform.position = newPosition; } } } } public class GurrenLagannGigaDrillMaximum : BaseSkillState { public static float energyCost = 50f; public static float c_DamageCoefficient = 7.5f; public static bool canBypassArmor = false; public static float procCoefficient = 1.5f; public int comboCounter; protected string hitboxName = "DammageHitbox"; protected float baseDuration; protected float attackStartTime; protected float attackEndTime; protected float baseEarlyExitTime; protected float hitStopDuration; protected string playbackRateString = "skill4.playbackRate"; protected GameObject hitEffectPrefab; protected NetworkSoundEventIndex impactSound; private float earlyExitTime; public float duration; private bool hasFired; private float hitPauseTimer; private OverlapAttack attack; private bool inHitPause; private float stopwatch; private Animator animator; private HitStopCachedState hitStopCachedState; private Vector3 storedVelocity; protected void PlayAttackAnimation() { ((EntityState)this).PlayAnimation("FullBody, Override", "GurrenLagannStandingTauntBattlecry", playbackRateString, duration, 0f); } protected OverlapAttack CreateAttack(HitBoxGroup hitBoxGroup) { //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_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_0029: 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_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_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_006a: 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_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_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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown return new OverlapAttack { damageType = DamageTypeCombo.op_Implicit((DamageType)(canBypassArmor ? 34 : 32)), attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, teamIndex = ((BaseState)this).GetTeam(), damage = c_DamageCoefficient * ((BaseState)this).damageStat, procCoefficient = procCoefficient, hitEffectPrefab = hitEffectPrefab, forceVector = Vector3.zero, pushAwayForce = 0f, hitBoxGroup = hitBoxGroup, isCrit = ((BaseState)this).RollCrit(), impactSound = impactSound }; } public override void OnEnter() { //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) ((BaseState)this).OnEnter(); if (NetworkServer.active) { SpiralEnergyComponent component = ((Component)((EntityState)this).characterBody).GetComponent<SpiralEnergyComponent>(); if (Object.op_Implicit((Object)(object)component)) { component.NetworkEnergy -= energyCost; } } baseDuration = 3f; attackStartTime = 0.33f; attackEndTime = 0.75f; baseEarlyExitTime = 0.25f; hitStopDuration = 0.115f; hitEffectPrefab = TTGLAssets.punchImpactEffect; impactSound = TTGLAssets.drillRushHitSoundEvent.index; duration = baseDuration / ((BaseState)this).attackSpeedStat; earlyExitTime = baseEarlyExitTime / ((BaseState)this).attackSpeedStat; hasFired = false; animator = ((EntityState)this).GetModelAnimator(); HitBoxGroup hitBoxGroup = null; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == hitboxName); } PlayAttackAnimation(); attack = CreateAttack(hitBoxGroup); } public override void OnExit() { if (!hasFired) { FireAttack(); } ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); ((EntityState)this).OnExit(); } protected virtual void OnHitEnemyAuthority() { //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_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 (!inHitPause) { storedVelocity = ((EntityState)this).characterMotor.velocity; hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, playbackRateString); hitPauseTimer = hitStopDuration / ((BaseState)this).attackSpeedStat; inHitPause = true; } } private void FireAttack() { if (!hasFired) { hasFired = true; Util.PlayAttackSpeedSound(ChargeArrow.chargeLoopStartSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); } if (((EntityState)this).isAuthority && attack.Fire((List<HurtBox>)null)) { OnHitEnemyAuthority(); } } public override void FixedUpdate() { //IL_002f: 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_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) ((EntityState)this).FixedUpdate(); hitPauseTimer -= Time.deltaTime; if (hitPauseTimer <= 0f && inHitPause) { ((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator); inHitPause = false; ((EntityState)this).characterMotor.velocity = storedVelocity; } if (!inHitPause) { stopwatch += Time.deltaTime; } else { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } if (Object.op_Implicit((Object)(object)animator)) { animator.SetFloat(playbackRateString, 0f); } } if (stopwatch >= duration * attackStartTime && stopwatch <= duration * attackEndTime) { FireAttack(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class GurrenLagannInitGigaDrillBreak : BaseSkillState { public static float energyCost = 50f; public static float damageCoefficient = 2.5f; public static float procCoefficient = 10f; public static float baseDuration = 2.3f; public static float throwForce = 200f; private float duration; private float fireTime; private bool hasFired; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = GurrenLagannThrowingShades.baseDuration / ((BaseState)this).attackSpeedStat; fireTime = 0.4f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); string text = "GurrenLagannThrowShadesRight"; if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.secondary) && ((EntityState)this).skillLocator.secondary.stock % 2 == 1) { text = "GurrenLagannThrowShadesLeft"; } if (((BaseState)this).isGrounded && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && ((Vector3)(ref ((EntityState)this).characterMotor.velocity)).magnitude <= 1f) { ((EntityState)this).PlayAnimation("FullBody, Override", text, "skill2.playbackRate", duration, 0f); } else { ((EntityState)this).PlayAnimation("Gesture, Override", text, "skill2.playbackRate", duration, 0f); } } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { //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_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) if (!hasFired) { hasFired = true; Util.PlayAttackSpeedSound(ThrowGlaive.attackSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(Projectiles.gigaDrillProjectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, GurrenLagannThrowingShades.damageCoefficient * ((BaseState)this).damageStat, 100f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, GurrenLagannThrowingShades.throwForce); } } } 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 GurrenLagannMain : GenericCharacterMain { } public class GurrenLagannShadesConstrictState : BaseState { public override void OnEnter() { ((BaseState)this).OnEnter(); FreezeCharacter(isEnabled: true); } public override void OnExit() { FreezeCharacter(isEnabled: false); ((EntityState)this).OnExit(); } private void FreezeCharacter(bool isEnabled) { //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_0020: 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) if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbody) && !((EntityState)this).rigidbody.isKinematic) { ((EntityState)this).rigidbody.velocity = Vector3.zero; } if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbodyMotor)) { ((Behaviour)((EntityState)this).rigidbodyMotor).enabled = !isEnabled; ((EntityState)this).rigidbodyMotor.moveVector = Vector3.zero; } ((EntityState)this).healthComponent.isInFrozenState = isEnabled; if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.moveVector = ((EntityState)this).characterDirection.forward; ((Behaviour)((EntityState)this).characterDirection).enabled = !isEnabled; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((Behaviour)((EntityState)this).characterMotor).enabled = !isEnabled; } Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { ((Behaviour)modelAnimator).enabled = !isEnabled; } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)5; } } public class GurrenLagannSpiralConversion : BaseSpiralConversion { protected override void PlayEnterAnimation() { ((EntityState)this).PlayAnimation("FullBody, Override", "GurrenLagannSpiralConversion"); } protected override void PlayExitAnimation() { ((EntityState)this).PlayAnimation("FullBody, Override", "GurrenLagannSpiralConversionExit"); } } public class GurrenLagannSplit : BaseSkillState { public static float baseDuration = 18f; public static float carryOverEnergyPercent = 1f; private float energy; public override void OnEnter() { ((BaseState)this).OnEnter(); SpiralEnergyComponent component = ((Component)((EntityState)this).characterBody).GetComponent<SpiralEnergyComponent>(); energy = component.NetworkEnergy; } public override void OnExit() { TransformToLagann(); ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } private void TransformToLagann() { //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_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) Util.PlaySound(BaseBeginArrowBarrage.blinkSoundString, ((EntityState)this).gameObject); if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master)) { CharacterMaster master = ((EntityState)this).characterBody.master; master.TransformBody("LagannBody"); SpawnGurren(); ((Component)master.GetBody()).GetComponent<SpiralEnergyComponent>().NetworkEnergy = energy - energy * carryOverEnergyPercent; GameObject bodyObject = master.GetBodyObject(); Popup(bodyObject, bodyObject.transform.position + Vector3.up * 5f); } } private void SpawnGurren() { //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_0016: 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_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_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) //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_0074: 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_0087: Unknown result type (might be due to invalid IL or missing references) float num = 0f; new MasterSummon { masterPrefab = Gurren.allyPrefab, position = ((EntityState)this).characterBody.transform.position + Vector3.up * num, rotation = ((EntityState)this).characterBody.transform.rotation, summonerBodyObject = (((Object)(object)((EntityState)this).characterBody != (Object)null) ? ((Component)((EntityState)this).characterBody).gameObject : null), ignoreTeamMemberLimit = true, useAmbientLevel = true, inventoryToCopy = ((EntityState)this).characterBody.inventory }.Perform(); } private void Popup(GameObject character, Vector3 newPosition) { //IL_0008: 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_0060: 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_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_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) if (Object.op_Implicit((Object)(object)character)) { Vector3 val = Vector3.up * 20f; CharacterMotor component = character.GetComponent<CharacterMotor>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)((BaseCharacterController)component).Motor)) { ((BaseCharacterController)component).Motor.SetPosition(newPosition, true); ((BaseCharacterController)component).Motor.BaseVelocity = val; component.velocity = val; } else { ((EntityState)this).gameObject.transform.position = newPosition; } } } } public class GurrenLagannThrowingShades : BaseSkillState { public static float damageCoefficient = 2.5f; public static float procCoefficient = 0.3f; public static float baseDuration = 2.3f; public static float throwForce = 200f; private float duration; private float fireTime; private bool hasFired; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireTime = 0.4f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); string text = "GurrenLagannThrowShadesRight"; if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.secondary) && ((EntityState)this).skillLocator.secondary.stock % 2 == 1) { text = "GurrenLagannThrowShadesLeft"; } if (((BaseState)this).isGrounded && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && ((Vector3)(ref ((EntityState)this).characterMotor.velocity)).magnitude <= 1f) { ((EntityState)this).PlayAnimation("FullBody, Override", text, "skill2.playbackRate", duration, 0f); } else { ((EntityState)this).PlayAnimation("Gesture, Override", text, "skill2.playbackRate", duration, 0f); } } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { //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_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_0060: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; Util.PlayAttackSpeedSound(ThrowGlaive.attackSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); GameObject val = (Config.useLegacyGigaDrillBreak ? Projectiles.gigaDrillProjectilePrefab : Projectiles.shadesWhirlPrefab); ProjectileManager.instance.FireProjectile(val, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 100f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, throwForce); } } } 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 GurrenLagannTornadoKick : BaseSkillState { public static float horizontal_duration = 1.5f; public static float vertical_duration = 2f; public static float initialSpeedCoefficient = 2.5f; public static float finalSpeedCoefficient = 2f; public static float damageCoefficient = 1.5f; public static float jumpVelocity = 7f; public static bool canControlDirection = false; public static float procCoefficient = 1f; public static string hitboxName = "DammageHitbox"; public static float dodgeFOV = DodgeState.dodgeFOV; private float burstSpeed; private Vector3 burstDirection; private Animator animator; private Vector3 previousPosition; public int swingIndex; protected float duration; protected DamageType damageType; protected float pushForce = 300f; protected Vector3 bonusForce = Vector3.zero; protected float attackStartTime; protected float attackEndTime = 1f; protected float baseEarlyExitTime = 0.4f; protected float hitStopDuration = 0.012f; protected float attackRecoil = 0.75f; protected float hitHopVelocity = 4f; protected string swingSoundString = ""; protected string hitSoundString = ""; protected string muzzleString = ""; protected string playbackRateString = ""; protected GameObject swingEffectPrefab; protected GameObject hitEffectPrefab; private bool hasFired; private float hitPauseTimer; private OverlapAttack attack; private bool inHitPause; private bool hasHopped; private float stopwatch; private HitStopCachedState hitStopCachedState; private Vector3 storedVelocity; private float hitIntervalStopwatch; private float hitInterval = 0.5f; public override void OnEnter() { //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) //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_004f: 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_0091: 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_0054: 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_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Expected O, but got Unknown //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_0158: 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_01cf: 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_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0252: 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_027b: 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_0289: 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) ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); playbackRateString = "skill3.playbackRate"; if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? Vector3.up : ((EntityState)this).inputBank.moveVector); burstDirection = ((Vector3)(ref val)).normalized; } bool flag = burstDirection == Vector3.up; duration = (flag ? vertical_duration : horizontal_duration); RecalculateBurstSpeed(flag); damageType = (DamageType)2; pushForce = 500f; bonusForce = Vector3.zero; attackStartTime = 0.1f; attackEndTime = 0.9f; baseEarlyExitTime = 0.3f; hitStopDuration = 0.115f; attackRecoil = 0.75f; hitHopVelocity = 6f; hitInterval = 0.5f * ((BaseState)this).attackSpeedStat; HitBoxGroup hitBoxGroup = null; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == hitboxName); } attack = new OverlapAttack(); attack.damageType = DamageTypeCombo.op_Implicit(damageType); attack.attacker = ((EntityState)this).gameObject; attack.inflictor = ((EntityState)this).gameObject; attack.teamIndex = ((BaseState)this).GetTeam(); attack.damage = damageCoefficient * ((BaseState)this).damageStat; attack.procCoefficient = procCoefficient; attack.hitEffectPrefab = hitEffectPrefab; attack.forceVector = bonusForce; attack.pushAwayForce = pushForce; attack.hitBoxGroup = hitBoxGroup; attack.isCrit = ((BaseState)this).RollCrit(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { if (flag) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, burstSpeed); } else { ((EntityState)this).characterMotor.velocity.y = 0f; ((EntityState)this).characterMotor.velocity = burstDirection * burstSpeed; } } Vector3 val2 = (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) ? ((EntityState)this).characterMotor.velocity : Vector3.zero); previousPosition = ((EntityState)this).transform.position - val2; ((EntityState)this).PlayAnimation("FullBody, Override", "GurrenLagannHurricaneKick", playbackRateString, duration, 0f); Util.PlaySound(SlideState.soundString, ((EntityState)this).gameObject); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } } private void RecalculateBurstSpeed(bool isVertical) { burstSpeed = ((!isVertical) ? ((BaseState)this).moveSpeedStat : jumpVelocity) * Mathf.Lerp(initialSpeedCoefficient, finalSpeedCoefficient, ((EntityState)this).fixedAge / duration); } public override void FixedUpdate() { //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_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_0092: 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_003f: 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_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_0044: 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_0239: 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_01b4: 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_01c4: 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) //IL_019e: 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_01e7: 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_01f3: 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_01f6: 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_022c: 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) ((EntityState)this).FixedUpdate(); Vector3 val; if (canControlDirection && Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? Vector3.up : ((EntityState)this).inputBank.moveVector); burstDirection = ((Vector3)(ref val)).normalized; } bool flag = burstDirection == Vector3.up; RecalculateBurstSpeed(flag); hitPauseTimer -= Time.deltaTime; if (hitPauseTimer <= 0f && inHitPause) { ((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator); inHitPause = false; ((EntityState)this).characterMotor.velocity = storedVelocity; } if (!inHitPause) { stopwatch += Time.deltaTime; hitIntervalStopwatch += Time.deltaTime; } else { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } if (Object.op_Implicit((Object)(object)animator)) { animator.SetFloat(playbackRateString, 0f); } } if (stopwatch >= duration * attackStartTime && stopwatch <= duration * attackEndTime) { if (hitIntervalStopwatch >= hitInterval) { hitIntervalStopwatch = 0f; attack.ignoredHealthComponentList.Clear(); } FireAttack(); } if (!flag && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.forward = burstDirection; } if (!flag) { val = ((EntityState)this).transform.position - previousPosition; Vector3 normalized = ((Vector3)(ref val)).normalized; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && normalized != Vector3.zero) { Vector3 val2 = normalized * burstSpeed; float num = Mathf.Max(Vector3.Dot(val2, burstDirection), 0f); val2 = burstDirection * num; val2.y = 0f; ((EntityState)this).characterMotor.velocity = val2; } } previousPosition = ((EntityState)this).transform.position; if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } protected virtual void OnHitEnemyAuthority() { //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_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) Util.PlaySound("TTGLDrillRushHit", ((EntityState)this).gameObject); if (!inHitPause) { storedVelocity = ((EntityState)this).characterMotor.velocity; hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, playbackRateString); hitPauseTimer = hitStopDuration / ((BaseState)this).attackSpeedStat; inHitPause = true; } } private void FireAttack() { if (!hasFired) { hasFired = true; Util.PlayAttackSpeedSound(swingSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); if (((EntityState)this).isAuthority) { ((BaseState)this).AddRecoil(-1f * attackRecoil, -2f * attackRecoil, -0.5f * attackRecoil, 0.5f * attackRecoil); } } if (((EntityState)this).isAuthority && attack.Fire((List<HurtBox>)null)) { OnHitEnemyAuthority(); } } public override void OnExit() { ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); ((EntityState)this).OnExit(); if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } } 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(burstDirection); } 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); burstDirection = reader.ReadVector3(); } } public class GurrenMain : GenericCharacterMain { } public class GurrenRoll : BaseSkillState { public static float duration = 1.5f; public static float initialSpeedCoefficient = 2f; public static float finalSpeedCoefficient = 1.5f; public static float dodgeFOV = DodgeState.dodgeFOV; private float rollSpeed; private Vector3 forwardDirection; private Animator animator; private Vector3 previousPosition; public override void OnEnter() { //IL_008c: 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_0091: 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_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_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_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_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_005f: 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_0123: 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_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: 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_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_0128: 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_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) ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); 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; } Vector3 val2 = (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) ? ((EntityState)this).characterDirection.forward : forwardDirection); Vector3 val3 = Vector3.Cross(Vector3.up, val2); Vector3.Dot(forwardDirection, val2); Vector3.Dot(forwardDirection, val3); 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; } Vector3 val4 = (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) ? ((EntityState)this).characterMotor.velocity : Vector3.zero); previousPosition = ((EntityState)this).transform.position - val4; ((EntityState)this).PlayAnimation("FullBody, Override", "GURREN_Roll", "skill3.playbackRate", duration, 0f); if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, duration); } } private void RecalculateRollSpeed() { rollSpeed = ((BaseState)this).moveSpeedStat * Mathf.Lerp(initialSpeedCoefficient, finalSpeedCoefficient, ((EntityState)this).fixedAge / duration); } public override void FixedUpdate() { //IL_0020: 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_0073: 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_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_0096: 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_00a3: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might