Decompiled source of Planetside Of Gunymede PreRelease v1.3.171
plugins/Planetside.dll
Decompiled 2 weeks 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.Security; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using Alexandria; using Alexandria.Assetbundle; using Alexandria.CharacterAPI; using Alexandria.DungeonAPI; using Alexandria.ItemAPI; using Alexandria.Misc; using Alexandria.NPCAPI; using Alexandria.PrefabAPI; using BepInEx; using Brave.BulletScript; using BreakAbleAPI; using ChallengeAPI; using Dungeonator; using EnemyBulletBuilder; using FullInspector; using FullSerializer; using Gungeon; using GungeonAPI; using HarmonyLib; using HutongGames.PlayMaker; using InControl; using Ionic.Zip; using ItemAPI; using MonoMod.Cil; using MonoMod.RuntimeDetour; using MonoMod.Utils; using Newtonsoft.Json.Linq; using NpcApi; using Pathfinding; using Planetside; using Planetside.Controllers.ContainmentBreach.BossChanges.Misc; using Planetside.SoundAPI; using SaveAPI; using SynergyAPI; using UnityEngine; using UnityEngine.Rendering; using UnityEngine.Serialization; using UnityEngine.Video; using tk2dRuntime.TileMap; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("Mod")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Mod")] [assembly: AssemblyCopyright("Copyright © 2020")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("d6d7a494-722e-4763-959b-c2d6b6a42b01")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] public class TimeStopBehavior : BasicAttackBehavior { private enum State { PreCharging, Charging, TimeStopped, TimeRestart } public bool m_laserActive; public bool IsTimeStopped; public float AlaserAngle; public BasicBeamController m_laserBeam; public ProjectileModule beamModule; public Transform beamTransform; private List<AIActor> EnemiesToDeFreeze = new List<AIActor>(); public float chargeTime; public float firingTime; private State m_state; private float m_timer; private Vector2 m_targetPosition; private SpeculativeRigidbody m_backupTarget; private BulletScriptSource m_bulletSource; public bool HasTriggeredScript; public BulletScriptSelector BulletScript; public Transform ShootPoint; public string ChargeAnimation; public string FireAnimation; public string PostFireAnimation; public bool LockInPlaceWhileAttacking; public bool TimeStopped => IsTimeStopped; public bool LaserActive => m_laserActive; public override void Start() { ((BasicAttackBehavior)this).Start(); ((BraveBehaviour)((BehaviorBase)this).m_aiActor).healthHaver.OnDeath += delegate { }; } public override void Upkeep() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) ((BasicAttackBehavior)this).Upkeep(); if (Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiActor.TargetRigidbody)) { m_targetPosition = ((BehaviorBase)this).m_aiActor.TargetRigidbody.GetUnitCenter((ColliderType)2); m_backupTarget = ((BehaviorBase)this).m_aiActor.TargetRigidbody; } else if (Object.op_Implicit((Object)(object)m_backupTarget)) { m_targetPosition = m_backupTarget.GetUnitCenter((ColliderType)2); } } public override BehaviorResult Update() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Invalid comparison between Unknown and I4 //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002b: 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_0094: Unknown result type (might be due to invalid IL or missing references) ((BasicAttackBehavior)this).Update(); BehaviorResult val = ((BasicAttackBehavior)this).Update(); if ((int)val > 0) { return val; } if (!((AttackBehaviorBase)this).IsReady()) { return (BehaviorResult)0; } PrechargeFiringLaser(); HasTriggeredScript = false; m_state = State.PreCharging; ((BehaviorBase)this).m_aiActor.SuppressTargetSwitch = true; ((BehaviorBase)this).m_aiActor.ClearPath(); ((BehaviorBase)this).m_updateEveryFrame = true; if (!string.IsNullOrEmpty(ChargeAnimation)) { ((BehaviorBase)this).m_aiAnimator.PlayUntilCancelled(ChargeAnimation, true, (string)null, -1f, false); } return (BehaviorResult)4; } public override ContinuousBehaviorResult ContinuousUpdate() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_01af: 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_01a8: Unknown result type (might be due to invalid IL or missing references) ((BehaviorBase)this).ContinuousUpdate(); if (m_state == State.PreCharging) { if (!LaserActive) { ChargeFiringLaser(chargeTime); m_timer = chargeTime; m_state = State.Charging; } } else { if (m_state == State.Charging) { m_timer -= ((BehaviorBase)this).m_deltaTime; if (m_timer <= 0f) { m_state = State.TimeStopped; StartTimeStop(); m_timer = firingTime; } return (ContinuousBehaviorResult)0; } if (m_state == State.TimeStopped) { if (!HasTriggeredScript) { HasTriggeredScript = true; if (BulletScript != null && !BulletScript.IsNull) { if (!Object.op_Implicit((Object)(object)m_bulletSource)) { m_bulletSource = GameObjectExtensions.GetOrAddComponent<BulletScriptSource>(((Component)ShootPoint).gameObject); } m_bulletSource.BulletManager = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).bulletBank; m_bulletSource.BulletScript = BulletScript; m_bulletSource.Initialize(); } } m_timer -= ((BehaviorBase)this).m_deltaTime; if (m_timer <= 0f || !TimeStopped) { if ((Object)(object)m_bulletSource != (Object)null) { m_bulletSource.ForceStop(); } return (ContinuousBehaviorResult)1; } } } return (ContinuousBehaviorResult)0; } public override void EndContinuousUpdate() { ((BehaviorBase)this).EndContinuousUpdate(); if (!string.IsNullOrEmpty(FireAnimation)) { ((BehaviorBase)this).m_aiAnimator.EndAnimationIf(FireAnimation); } StopFiringLaser(); ((BehaviorBase)this).m_aiAnimator.LockFacingDirection = false; ((BehaviorBase)this).m_aiActor.SuppressTargetSwitch = false; ((BehaviorBase)this).m_updateEveryFrame = false; ((BasicAttackBehavior)this).UpdateCooldowns(); } public override bool IsOverridable() { return false; } public void PrechargeFiringLaser() { } public void ChargeFiringLaser(float time) { } public void StartTimeStop() { AkSoundEngine.PostEvent("Play_OBJ_time_bell_01", ((Component)((BehaviorBase)this).m_aiActor).gameObject); RoomHandler absoluteParentRoom = ((DungeonPlaceableBehaviour)((BehaviorBase)this).m_aiActor).GetAbsoluteParentRoom(); List<AIActor> activeEnemies = absoluteParentRoom.GetActiveEnemies((ActiveEnemyType)0); if (activeEnemies == null) { return; } foreach (AIActor item in activeEnemies) { if ((Object)(object)item != (Object)null && (Object)(object)item != (Object)(object)((BehaviorBase)this).m_aiActor) { item.LocalTimeScale = 0f; ((BraveBehaviour)item).aiAnimator.FpsScale = 0f; ((BraveBehaviour)item).behaviorSpeculator.LocalTimeScale = 0f; EnemiesToDeFreeze.Add(item); } } } public void StopFiringLaser() { if (TimeStopped) { StopTimeStop(); if (!string.IsNullOrEmpty(PostFireAnimation)) { ((BehaviorBase)this).m_aiAnimator.PlayUntilFinished(PostFireAnimation, true, (string)null, -1f, false); } m_laserActive = false; IsTimeStopped = false; } } public void StopTimeStop() { foreach (AIActor item in EnemiesToDeFreeze) { if ((Object)(object)item != (Object)null) { item.LocalTimeScale = 1f; ((BraveBehaviour)item).aiAnimator.FpsScale = 1f; ((BraveBehaviour)item).behaviorSpeculator.LocalTimeScale = 1f; EnemiesToDeFreeze.Remove(item); } } } } public class AddDashComponent : BraveBehaviour { public static GameObject shootpoint; public float distortionMaxRadius = 50f; public float distortionDuration = 1f; public float distortionIntensity = 0.5f; public float distortionThickness = 0.2f; public float WaitTime; public AddDashComponent() { WaitTime = 10f; } public void Start() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //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_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_00ab: 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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown GameObject val = new GameObject(); val.transform.parent = ((BraveBehaviour)((BraveBehaviour)this).aiActor).transform; val.transform.position = Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldCenter); GameObject shootPoint = val; ((Component)((BraveBehaviour)this).aiActor).gameObject.AddComponent<AfterImageTrailController>().spawnShadows = false; ((Component)((BraveBehaviour)this).aiActor).gameObject.AddComponent<tk2dSpriteAttachPoint>(); ((Component)((BraveBehaviour)this).aiActor).gameObject.AddComponent<ObjectVisibilityManager>(); ((GameActor)((BraveBehaviour)this).aiActor).HasShadow = true; ((GameActor)((BraveBehaviour)this).aiActor).ShadowObject = ((GameActor)EnemyDatabase.GetOrLoadByGuid("4db03291a12144d69fe940d5a01de376")).ShadowObject; DashBehavior item = new DashBehavior { ShootPoint = shootPoint, dashDistance = 7f, dashTime = 0.2f, doubleDashChance = 0f, enableShadowTrail = false, Cooldown = 3f, dashDirection = (DashDirection)30, warpDashAnimLength = true, hideShadow = true, InitialCooldown = 1f, chargeAnim = null, RequiresLineOfSight = false }; ((BraveBehaviour)((BraveBehaviour)this).aiActor).behaviorSpeculator.AttackBehaviors.Add((AttackBehaviorBase)(object)item); } private void OnPreDeath(Vector2 obj) { } } public class AIBeamShooter2 : BraveBehaviour { public string shootAnim; public AIAnimator specifyAnimator; public Transform beamTransform; public VFXPool chargeVfx; public Projectile beamProjectile; public ProjectileModule beamModule; public bool TurnDuringDissipation = true; public bool PreventBeamContinuation; [Header("Depth")] public float heightOffset = 1.9f; public float northAngleTolerance = 90f; public float northRampHeight; public float otherRampHeight = 5f; public Vector2 firingEllipseCenter; public float firingEllipseA; public float firingEllipseB; public float eyeballFudgeAngle; private bool m_firingLaser; private float m_laserAngle; public BasicBeamController m_laserBeam; private BodyPartController m_bodyPart; public float LaserAngle => m_laserAngle; public bool IsFiringLaser => m_firingLaser; public Vector2 LaserFiringCenter => Vector3Extensions.XY(beamTransform.position) + firingEllipseCenter; public AIAnimator CurrentAiAnimator => (!Object.op_Implicit((Object)(object)specifyAnimator)) ? ((BraveBehaviour)this).aiAnimator : specifyAnimator; public float MaxBeamLength { get; set; } public BeamController LaserBeam => (BeamController)(object)m_laserBeam; public bool IgnoreAiActorPlayerChecks { get; set; } public void SetLaserAngle(float alaserAngle) { m_laserAngle = alaserAngle; if (m_firingLaser) { ((BraveBehaviour)this).aiAnimator.FacingDirection = alaserAngle; } } public void Start() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown ((BraveBehaviour)this).healthHaver.OnDamaged += new OnDamagedEvent(OnDamaged); if (Object.op_Implicit((Object)(object)specifyAnimator)) { m_bodyPart = ((Component)specifyAnimator).GetComponent<BodyPartController>(); } } public void Update() { } public void LateUpdate() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)m_laserBeam) && MaxBeamLength > 0f) { ((BraveBehaviour)m_laserBeam).projectile.baseData.range = MaxBeamLength; m_laserBeam.ShowImpactOnMaxDistanceEnd = true; } if (m_firingLaser && Object.op_Implicit((Object)(object)m_laserBeam)) { ((BeamController)m_laserBeam).LateUpdatePosition(GetTrueLaserOrigin()); } else if (Object.op_Implicit((Object)(object)m_laserBeam) && (int)m_laserBeam.State == 3) { ((BeamController)m_laserBeam).LateUpdatePosition(GetTrueLaserOrigin()); } else if (m_firingLaser && !Object.op_Implicit((Object)(object)m_laserBeam)) { StopFiringLaser(); } } public override void OnDestroy() { if (Object.op_Implicit((Object)(object)m_laserBeam)) { ((BeamController)m_laserBeam).CeaseAttack(); } ((BraveBehaviour)this).OnDestroy(); } public void OnDamaged(float resultValue, float maxValue, CoreDamageTypes damageTypes, DamageCategory damageCategory, Vector2 damageDirection) { if (resultValue <= 0f) { if (m_firingLaser) { chargeVfx.DestroyAll(); StopFiringLaser(); } if (Object.op_Implicit((Object)(object)m_laserBeam)) { ((BeamController)m_laserBeam).DestroyBeam(); m_laserBeam = null; } } } public void StartFiringLaser(float laserAngle) { m_firingLaser = true; SetLaserAngle(laserAngle); if (Object.op_Implicit((Object)(object)m_bodyPart)) { m_bodyPart.OverrideFacingDirection = true; } if (!string.IsNullOrEmpty(shootAnim)) { CurrentAiAnimator.LockFacingDirection = true; CurrentAiAnimator.PlayUntilCancelled(shootAnim, true, (string)null, -1f, false); } chargeVfx.DestroyAll(); ((MonoBehaviour)this).StartCoroutine(FireBeam((!Object.op_Implicit((Object)(object)beamProjectile)) ? beamModule.GetCurrentProjectile() : beamProjectile)); } public void StopFiringLaser() { m_firingLaser = false; if (Object.op_Implicit((Object)(object)m_bodyPart)) { m_bodyPart.OverrideFacingDirection = false; } if (!string.IsNullOrEmpty(shootAnim)) { CurrentAiAnimator.LockFacingDirection = false; CurrentAiAnimator.EndAnimationIf(shootAnim); } } public IEnumerator FireBeam(Projectile projectile) { GameObject beamObject = Object.Instantiate<GameObject>(((Component)projectile).gameObject); m_laserBeam = beamObject.GetComponent<BasicBeamController>(); ((BeamController)m_laserBeam).Owner = (GameActor)(object)((BraveBehaviour)this).aiActor; ((BeamController)m_laserBeam).HitsPlayers = projectile.collidesWithPlayer || (!IgnoreAiActorPlayerChecks && Object.op_Implicit((Object)(object)((BraveBehaviour)this).aiActor) && ((BraveBehaviour)this).aiActor.CanTargetPlayers); ((BeamController)m_laserBeam).HitsEnemies = projectile.collidesWithEnemies || (Object.op_Implicit((Object)(object)((BraveBehaviour)this).aiActor) && ((BraveBehaviour)this).aiActor.CanTargetEnemies); bool facingNorth2 = BraveMathCollege.AbsAngleBetween(LaserAngle, 90f) < northAngleTolerance; m_laserBeam.HeightOffset = heightOffset; m_laserBeam.RampHeightOffset = ((!facingNorth2) ? otherRampHeight : northRampHeight); m_laserBeam.ContinueBeamArtToWall = !PreventBeamContinuation; bool firstFrame = true; while ((Object)(object)m_laserBeam != (Object)null && m_firingLaser) { float clampedAngle = BraveMathCollege.ClampAngle360(LaserAngle); Vector2 dirVec = Vector2.op_Implicit(new Vector3(Mathf.Cos(clampedAngle * ((float)Math.PI / 180f)), Mathf.Sin(clampedAngle * ((float)Math.PI / 180f))) * 10f); ((BeamController)m_laserBeam).Origin = Vector2.op_Implicit(GetTrueLaserOrigin()); ((BeamController)m_laserBeam).Direction = dirVec; if (firstFrame) { yield return null; firstFrame = false; continue; } facingNorth2 = BraveMathCollege.AbsAngleBetween(LaserAngle, 90f) < northAngleTolerance; m_laserBeam.RampHeightOffset = ((!facingNorth2) ? otherRampHeight : northRampHeight); yield return null; while (Time.timeScale == 0f) { yield return null; } } if (!m_firingLaser && (Object)(object)m_laserBeam != (Object)null) { ((BeamController)m_laserBeam).CeaseAttack(); } if (TurnDuringDissipation && Object.op_Implicit((Object)(object)m_laserBeam)) { m_laserBeam.SelfUpdate = false; while (Object.op_Implicit((Object)(object)m_laserBeam)) { ((BeamController)m_laserBeam).Origin = Vector2.op_Implicit(GetTrueLaserOrigin()); yield return null; } } m_laserBeam = null; } private Vector3 GetTrueLaserOrigin() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) Vector2 val = LaserFiringCenter; if (firingEllipseA != 0f && firingEllipseB != 0f) { float num = Mathf.Lerp(eyeballFudgeAngle, 0f, BraveMathCollege.AbsAngleBetween(90f, Mathf.Abs(BraveMathCollege.ClampAngle180(LaserAngle))) / 90f); val = BraveMathCollege.GetEllipsePoint(val, firingEllipseA, firingEllipseB, LaserAngle + num); } return Vector2.op_Implicit(val); } } public class UmbraMinionsbehavior : BraveBehaviour { public static List<int> Lootdrops = new List<int> { 73, 85, 120, 224, 600, 78, 565 }; public bool DropsChests; public int ChestAmount; public bool DropsPickups; public int PickupAmount; public bool TriggersUnlock; public float HPMultiplier; public float CooldownMulitplier; public bool GainsSkulls; public int SkullAmount; public float distortionMaxRadius = 50f; public float distortionDuration = 1f; public float distortionIntensity = 0.5f; public float distortionThickness = 0.2f; public float TimeUntilInvulnerabilityGone; public UmbraMinionsbehavior() { TimeUntilInvulnerabilityGone = 10f; DropsChests = false; DropsPickups = false; PickupAmount = 1; ChestAmount = 1; TriggersUnlock = false; HPMultiplier = 1f; GainsSkulls = false; SkullAmount = 3; CooldownMulitplier = 1f; } public void Start() { //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Expected O, but got Unknown //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Expected O, but got Unknown //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.SetHealthMaximum(((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.GetCurrentHealth() * HPMultiplier, (float?)null, true); ((DungeonPlaceableBehaviour)((BraveBehaviour)this).aiActor).GetAbsoluteParentRoom().SealRoom(); BehaviorSpeculator behaviorSpeculator = ((BraveBehaviour)((BraveBehaviour)this).aiActor).behaviorSpeculator; behaviorSpeculator.CooldownScale *= CooldownMulitplier; ((MonoBehaviour)this).StartCoroutine(Speed(((BraveBehaviour)this).aiActor)); AIActor aiActor = ((BraveBehaviour)this).aiActor; aiActor.MovementSpeed *= 1.25f; ((BraveBehaviour)this).healthHaver.OnPreDeath += OnPreDeath; ((BraveBehaviour)this).healthHaver.OnDeath += Die; ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.bossHealthBar = (BossBarType)1; if (GainsSkulls) { ((BraveBehaviour)((BraveBehaviour)this).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("465da2bb086a4a88a803f79fe3a27677")).bulletBank.GetBullet("homing")); GameObject val = new GameObject(); val = new GameObject("fuck"); val.transform.parent = ((BraveBehaviour)((BraveBehaviour)this).aiActor).transform; val.transform.position = Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldCenter); GameObject gameObject = ((Component)((BraveBehaviour)((BraveBehaviour)this).aiActor).transform.Find("fuck")).gameObject; CustomSpinBulletsBehavior item = new CustomSpinBulletsBehavior { ShootPoint = gameObject, OverrideBulletName = "homing", NumBullets = 2, BulletMinRadius = 2.4f, BulletMaxRadius = 2.5f, BulletCircleSpeed = 75, BulletsIgnoreTiles = true, RegenTimer = 0.1f, AmountOFLines = SkullAmount }; ((BraveBehaviour)((BraveBehaviour)this).aiActor).behaviorSpeculator.OtherBehaviors.Add((BehaviorBase)(object)item); } } public IEnumerator Speed(AIActor actor) { if ((Object)(object)actor != (Object)null) { ((BraveBehaviour)this).aiActor.HasBeenEngaged = false; ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.PreventAllDamage = true; yield return (object)new WaitForSeconds(TimeUntilInvulnerabilityGone); ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.PreventAllDamage = false; ((BraveBehaviour)this).aiActor.HasBeenEngaged = true; AkSoundEngine.PostEvent("Play_Baboom", ((Component)this).gameObject); Exploder.DoDistortionWave(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldCenter, distortionIntensity, distortionThickness, distortionMaxRadius, distortionDuration); } } private void Die(Vector2 finalDamageDirection) { //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_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0067: 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_008b: 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_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) PlayerController primaryPlayer = GameManager.Instance.PrimaryPlayer; ((BraveBehaviour)this).aiActor.ParentRoom.UnsealRoom(); if (DropsPickups) { for (int i = 0; i < PickupAmount; i++) { int num = BraveUtility.RandomElement<int>(Lootdrops); IntVector2 bestRewardLocation = primaryPlayer.CurrentRoom.GetBestRewardLocation(IntVector2.One * 3, (RewardLocationStyle)1, true); LootEngine.SpawnItem(((Component)PickupObjectDatabase.GetById(num)).gameObject, ((IntVector2)(ref bestRewardLocation)).ToCenterVector3(0f), new Vector2(0f, 0f), 1.2f, false, true, false); LootEngine.DoDefaultItemPoof(((IntVector2)(ref bestRewardLocation)).ToVector2(), false, true); } } if (DropsChests) { for (int j = 0; j < ChestAmount; j++) { IntVector2 bestRewardLocation2 = primaryPlayer.CurrentRoom.GetBestRewardLocation(IntVector2.One * 3, (RewardLocationStyle)1, true); Chest val = GameManager.Instance.RewardManager.SpawnRewardChestAt(bestRewardLocation2, -1f, (ItemQuality)(-100)); val.RegisterChestOnMinimap(((DungeonPlaceableBehaviour)val).GetAbsoluteParentRoom()); } } if (!TriggersUnlock) { } } private void OnPreDeath(Vector2 obj) { //IL_0007: 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) RoomHandler absoluteRoom = Vector3Extensions.GetAbsoluteRoom(((BraveBehaviour)this).transform.position); AkSoundEngine.PostEvent("Play_BOSS_lichB_grab_01", ((Component)this).gameObject); GameObject val = Object.Instantiate<GameObject>(StaticVFXStorage.hellDragController.HellDragVFX); tk2dBaseSprite component = val.GetComponent<tk2dBaseSprite>(); component.usesOverrideMaterial = true; component.PlaceAtLocalPositionByAnchor(Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)this).aiActor).specRigidbody.UnitCenter), (Anchor)1); ((BraveBehaviour)component).renderer.material.shader = ShaderCache.Acquire("Brave/Effects/StencilMasked"); ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite).renderer.enabled = false; } } public class UmbraController : BraveBehaviour { public class Baboomer : Script { private class BigBullet : Bullet { private class SmallBullet : Bullet { public SmallBullet() : base("reversible", false, false, true) { } public override IEnumerator Top() { ((Bullet)this).ChangeSpeed(new Speed(12f, (SpeedType)0), 120); yield break; } } public BigBullet() : base("big_one", false, false, true) { } public override void Initialize() { ((BraveBehaviour)base.Projectile).spriteAnimator.StopAndResetFrameToDefault(); ((Bullet)this).Initialize(); } public override IEnumerator Top() { ((Bullet)this).BulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("1bc2a07ef87741be90c37096910843ab")).bulletBank.GetBullet("reversible")); ((BraveBehaviour)base.Projectile).specRigidbody.CollideWithTileMap = false; ((BraveBehaviour)base.Projectile).specRigidbody.CollideWithOthers = false; yield return ((Bullet)this).Wait(60); ((Bullet)this).PostWwiseEvent("Play_ENM_bulletking_slam_01", (string)null); base.Speed = 0f; ((BraveBehaviour)base.Projectile).spriteAnimator.Play(); ((Bullet)this).Vanish(true); } public override void OnBulletDestruction(DestroyType destroyType, SpeculativeRigidbody hitRigidbody, bool preventSpawningProjectiles) { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_007a: Expected O, but got Unknown //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_00c3: Expected O, but got Unknown //IL_00c3: Expected O, but got Unknown if (!preventSpawningProjectiles) { ((Bullet)this).BulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("1bc2a07ef87741be90c37096910843ab")).bulletBank.GetBullet("reversible")); float num = ((Bullet)this).RandomAngle(); float num2 = 16f; float num3 = 360f / num2; for (int i = 0; (float)i < num2; i++) { ((Bullet)this).Fire(new Direction(num3 * (float)i + num, (DirectionType)1, -1f), new Speed(7f, (SpeedType)0), (Bullet)(object)new SmallBullet()); } num = ((Bullet)this).RandomAngle(); for (int j = 0; (float)j < num2; j++) { ((Bullet)this).Fire(new Direction(num3 * (float)j + num, (DirectionType)1, -1f), new Speed(3f, (SpeedType)0), (Bullet)(object)new SmallBullet()); } num = ((Bullet)this).RandomAngle(); ((Bullet)this).PostWwiseEvent("Play_ENM_bulletking_slam_01", (string)null); } } } public override IEnumerator Top() { ((Bullet)this).PostWwiseEvent("Play_ENM_bulletking_slam_01", (string)null); ((Bullet)this).BulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("4d164ba3f62648809a4a82c90fc22cae")).bulletBank.GetBullet("big_one")); ((Bullet)this).Fire(Offset.OverridePosition(((Bullet)this).Position + new Vector2(0f, 30f)), new Direction(-90f, (DirectionType)1, -1f), new Speed(30f, (SpeedType)0), (Bullet)(object)new BigBullet()); yield break; } } public bool CanTeleport; public bool CanDash; public void Start() { //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) ((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.usesOverrideMaterial = true; ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite).renderer.material.shader = Shader.Find("Brave/PlayerShaderEevee"); ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite).renderer.material.SetTexture("_EeveeTex", StaticTextures.NebulaTexture); ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite).renderer.material.SetFloat("_StencilVal", 0f); ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite).renderer.material.SetFloat("_FlatColor", 0f); ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite).renderer.material.SetFloat("_Perpendicular", 0f); BehaviorSpeculator behaviorSpeculator = ((BraveBehaviour)((BraveBehaviour)this).aiActor).behaviorSpeculator; behaviorSpeculator.CooldownScale *= 0.7f; AIActor aiActor = ((BraveBehaviour)this).aiActor; aiActor.MovementSpeed *= 1.15f; ImprovedAfterImage orAddComponent = GameObjectExtensions.GetOrAddComponent<ImprovedAfterImage>(((Component)((BraveBehaviour)this).aiActor).gameObject); orAddComponent.dashColor = Color.black; orAddComponent.spawnShadows = true; orAddComponent.shadowTimeDelay = 0.025f; orAddComponent.shadowLifetime = 1.5f; } public void Update() { if (!((BraveBehaviour)this).aiActor.IsBlackPhantom && (Object)(object)((BraveBehaviour)this).aiActor != (Object)null) { ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite).renderer.material.shader = Shader.Find("Brave/PlayerShaderEevee"); ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite).renderer.material.SetTexture("_EeveeTex", StaticTextures.NebulaTexture); ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite).renderer.material.SetFloat("_StencilVal", 0f); ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite).renderer.material.SetFloat("_FlatColor", 0f); ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite).renderer.material.SetFloat("_Perpendicular", 0f); ((BraveBehaviour)this).aiActor.BecomeBlackPhantom(); } } public override void OnDestroy() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((BraveBehaviour)this).aiActor)) { ? val = ((BraveBehaviour)this).aiActor; Object obj = ResourceCache.Acquire("Global VFX/VFX_Curse"); ((GameActor)val).PlayEffectOnActor((GameObject)(object)((obj is GameObject) ? obj : null), Vector3.zero, false, false, false); SpawnManager.SpawnBulletScript(((BraveBehaviour)((BraveBehaviour)this).aiActor).gameActor, (BulletScriptSelector)(object)new CustomBulletScriptSelector(typeof(Baboomer)), (Vector2?)null, (Vector2?)null, false, (string)null); } ((BraveBehaviour)this).OnDestroy(); } } public class EpicDashbehav : BasicAttackBehavior { private enum FireState { Idle, Priming, Charging, Bouncing } private string lol; public bool CanChargeUp; public bool CanChargeDown; public bool CanChargeLeft; public bool CanChargeRight; public string primeAnim; public string chargeAnim; public bool endWhenChargeAnimFinishes; public bool switchCollidersOnCharge; public string hitAnim; public string hitPlayerAnim; public float leadAmount; public float chargeRange = 15f; public float chargeSpeed; public float chargeKnockback = 50f; public float chargeDamage = 0.5f; public bool delayWallRecoil; public float wallRecoilForce = 10f; public bool stopAtPits = true; public GameObject launchVfx; public GameObject trailVfx; public Transform trailVfxParent; public GameObject hitVfx; public string trailVfxString; public string hitWallVfxString; [InspectorHeader("Impact BulletScript")] public GameObject shootPoint; public BulletScriptSelector impactBulletScript; private FireState m_state; private float m_primeAnimTime; private Vector2? m_chargeDir; private Vector2? m_storedCollisionNormal; private bool m_hitPlayer; private bool m_hitWall; private float m_cachedKnockback; private float m_cachedDamage; private VFXPool m_cachedVfx; private CellTypes m_cachedPathableTiles; private bool m_cachedDoDustUps; private PixelCollider m_enemyCollider; private PixelCollider m_enemyHitbox; private PixelCollider m_projectileCollider; private GameObject m_trailVfx; private string m_cachedTrailString; private BulletScriptSource m_bulletSource; public string EpicDashbehavName => lol; private FireState State => m_state; private void SetName(string name) { lol = name; } public override void Start() { //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_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Expected O, but got Unknown //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Invalid comparison between Unknown and I4 //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Invalid comparison between Unknown and I4 ((BasicAttackBehavior)this).Start(); SpeculativeRigidbody specRigidbody = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody; specRigidbody.OnCollision = (Action<CollisionData>)Delegate.Combine(specRigidbody.OnCollision, new Action<CollisionData>(OnCollision)); m_cachedKnockback = ((BehaviorBase)this).m_aiActor.CollisionKnockbackStrength; m_cachedDamage = ((BehaviorBase)this).m_aiActor.CollisionDamage; m_cachedVfx = ((BehaviorBase)this).m_aiActor.CollisionVFX; m_cachedPathableTiles = ((BehaviorBase)this).m_aiActor.PathableTiles; m_cachedDoDustUps = ((GameActor)((BehaviorBase)this).m_aiActor).DoDustUps; if (switchCollidersOnCharge) { for (int i = 0; i < ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.PixelColliders.Count; i++) { PixelCollider val = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.PixelColliders[i]; if ((int)val.CollisionLayer == 3) { m_enemyCollider = val; } if ((int)val.CollisionLayer == 2) { m_enemyHitbox = val; } if (!val.Enabled && (int)val.CollisionLayer == 4) { m_projectileCollider = val; PixelCollider projectileCollider = m_projectileCollider; projectileCollider.CollisionLayerCollidableOverride |= CollisionMask.LayerToMask((CollisionLayer)4); } } } if (stopAtPits) { SpeculativeRigidbody specRigidbody2 = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody; specRigidbody2.MovementRestrictor = (MovementRestrictorDelegate)Delegate.Combine((Delegate?)(object)specRigidbody2.MovementRestrictor, (Delegate?)new MovementRestrictorDelegate(PitMovementRestrictor)); } if (!string.IsNullOrEmpty(primeAnim)) { m_primeAnimTime = ((BehaviorBase)this).m_aiAnimator.GetDirectionalAnimationLength(primeAnim); } ((BehaviorBase)this).m_aiActor.OverrideHitEnemies = true; } public override void Upkeep() { ((BasicAttackBehavior)this).Upkeep(); } public override BehaviorResult Update() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Invalid comparison between Unknown and I4 //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) ((BasicAttackBehavior)this).Update(); BehaviorResult val = ((BasicAttackBehavior)this).Update(); if ((int)val > 0) { return val; } if (!((AttackBehaviorBase)this).IsReady()) { return (BehaviorResult)0; } for (int i = 0; i < GameManager.Instance.AllPlayers.Length; i++) { PlayerController val2 = GameManager.Instance.AllPlayers[i]; if (Object.op_Implicit((Object)(object)val2) && !((BraveBehaviour)val2).healthHaver.IsDead && !((GameActor)val2).IsFalling && ShouldChargePlayer(GameManager.Instance.AllPlayers[i])) { SetFireState(FireState.Priming); ((BehaviorBase)this).m_updateEveryFrame = true; return (BehaviorResult)4; } } return (BehaviorResult)0; } public override ContinuousBehaviorResult ContinuousUpdate() { //IL_0125: 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_0128: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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) if (State == FireState.Priming) { if (!((BehaviorBase)this).m_aiAnimator.IsPlaying(primeAnim)) { if (!Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiActor.TargetRigidbody)) { return (ContinuousBehaviorResult)1; } SetFireState(FireState.Charging); } } else if (State == FireState.Charging) { if (endWhenChargeAnimFinishes && !((BehaviorBase)this).m_aiAnimator.IsPlaying(chargeAnim)) { return (ContinuousBehaviorResult)1; } } else if (State == FireState.Bouncing && !((BehaviorBase)this).m_aiAnimator.IsPlaying(hitAnim) && !((BehaviorBase)this).m_aiAnimator.IsPlaying(hitPlayerAnim)) { if (delayWallRecoil && m_storedCollisionNormal.HasValue) { ((BraveBehaviour)((BehaviorBase)this).m_aiActor).knockbackDoer.ApplyKnockback(m_storedCollisionNormal.Value, wallRecoilForce, false); m_storedCollisionNormal = null; } return (ContinuousBehaviorResult)1; } return (ContinuousBehaviorResult)0; } public override void EndContinuousUpdate() { ((BehaviorBase)this).EndContinuousUpdate(); ((BehaviorBase)this).m_updateEveryFrame = false; SetFireState(FireState.Idle); ((BasicAttackBehavior)this).UpdateCooldowns(); } public override void Destroy() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown ((BehaviorBase)this).Destroy(); if (stopAtPits) { SpeculativeRigidbody specRigidbody = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody; specRigidbody.MovementRestrictor = (MovementRestrictorDelegate)Delegate.Remove((Delegate?)(object)specRigidbody.MovementRestrictor, (Delegate?)new MovementRestrictorDelegate(PitMovementRestrictor)); } } private void OnCollision(CollisionData collisionData) { //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Invalid comparison between Unknown and I4 //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_0208: 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_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) if (State != FireState.Charging) { return; } if (Object.op_Implicit((Object)(object)collisionData.OtherRigidbody)) { SpeculativeRigidbody otherRigidbody = collisionData.OtherRigidbody; if (Object.op_Implicit((Object)(object)((BraveBehaviour)otherRigidbody).projectile)) { return; } if (Object.op_Implicit((Object)(object)((BraveBehaviour)otherRigidbody).aiActor)) { if (!((BraveBehaviour)otherRigidbody).aiActor.OverrideHitEnemies) { collisionData.OtherRigidbody.RegisterTemporaryCollisionException(collisionData.MyRigidbody, 0.1f, (float?)null); collisionData.MyRigidbody.RegisterTemporaryCollisionException(collisionData.OtherRigidbody, 0.1f, (float?)null); return; } float num = Vector2Extensions.ToAngle(collisionData.MyRigidbody.Velocity); float num2 = Vector2Extensions.ToAngle(((CastResult)collisionData).Normal); if (Mathf.Abs(BraveMathCollege.ClampAngle180(num - num2)) <= 91f) { return; } float magnitude = ((Vector2)(ref collisionData.MyRigidbody.Velocity)).magnitude; float magnitude2 = ((Vector2)(ref otherRigidbody.Velocity)).magnitude; float num3 = Vector2Extensions.ToAngle(otherRigidbody.Velocity); if (Mathf.Abs(BraveMathCollege.ClampAngle180(num - num3)) < 45f && magnitude < magnitude2 * 1.25f) { return; } } } m_hitPlayer = Object.op_Implicit((Object)(object)collisionData.OtherRigidbody) && Object.op_Implicit((Object)(object)((Component)collisionData.OtherRigidbody).GetComponent<PlayerController>()); m_hitWall = (int)collisionData.collisionType == 1; SetFireState(FireState.Bouncing); if (!Object.op_Implicit((Object)(object)collisionData.OtherRigidbody) || !Object.op_Implicit((Object)(object)((BraveBehaviour)collisionData.OtherRigidbody).knockbackDoer)) { if (delayWallRecoil) { m_storedCollisionNormal = ((CastResult)collisionData).Normal; if (((CastResult)collisionData).Normal == Vector2.zero) { Vector2? chargeDir = m_chargeDir; m_storedCollisionNormal = ((!chargeDir.HasValue) ? null : new Vector2?(-chargeDir.Value)); } } else { m_storedCollisionNormal = null; ((BraveBehaviour)((BehaviorBase)this).m_aiActor).knockbackDoer.ApplyKnockback(((CastResult)collisionData).Normal, wallRecoilForce, false); } } else { m_storedCollisionNormal = null; } if (!Object.op_Implicit((Object)(object)collisionData.OtherRigidbody) && !string.IsNullOrEmpty(hitWallVfxString)) { string arg = ((m_storedCollisionNormal.Value.x < -0.75f) ? "right" : ((m_storedCollisionNormal.Value.x > 0.75f) ? "left" : ((!(m_storedCollisionNormal.Value.y < -0.75f)) ? "down" : "up"))); ((BehaviorBase)this).m_aiAnimator.PlayVfx(string.Format(hitWallVfxString, arg), (Vector2?)null, (Vector2?)null, (Vector2?)null); } } private void PitMovementRestrictor(SpeculativeRigidbody specRigidbody, IntVector2 prevPixelOffset, IntVector2 pixelOffset, ref bool validLocation) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008b: 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_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_014d: 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_0114: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) if (!validLocation) { return; } Func<IntVector2, bool> func = delegate(IntVector2 pixel) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: 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) Vector2 val2 = PhysicsEngine.PixelToUnitMidpoint(pixel); if (!GameManager.Instance.Dungeon.CellSupportsFalling(Vector2.op_Implicit(val2))) { return false; } List<SpeculativeRigidbody> platformsAt = GameManager.Instance.Dungeon.GetPlatformsAt(Vector2.op_Implicit(val2)); if (platformsAt != null) { for (int i = 0; i < platformsAt.Count; i++) { if (platformsAt[i].PrimaryPixelCollider.ContainsPixel(pixel)) { return false; } } } return true; }; PixelCollider primaryPixelCollider = specRigidbody.PrimaryPixelCollider; if (primaryPixelCollider != null) { IntVector2 val = pixelOffset - prevPixelOffset; if (val == IntVector2.Down && func(primaryPixelCollider.LowerLeft + pixelOffset) && func(primaryPixelCollider.LowerRight + pixelOffset) && (!func(primaryPixelCollider.UpperRight + prevPixelOffset) || !func(primaryPixelCollider.UpperLeft + prevPixelOffset))) { validLocation = false; } else if (val == IntVector2.Right && func(primaryPixelCollider.LowerRight + pixelOffset) && func(primaryPixelCollider.UpperRight + pixelOffset) && (!func(primaryPixelCollider.UpperLeft + prevPixelOffset) || !func(primaryPixelCollider.LowerLeft + prevPixelOffset))) { validLocation = false; } else if (val == IntVector2.Up && func(primaryPixelCollider.UpperRight + pixelOffset) && func(primaryPixelCollider.UpperLeft + pixelOffset) && (!func(primaryPixelCollider.LowerLeft + prevPixelOffset) || !func(primaryPixelCollider.LowerRight + prevPixelOffset))) { validLocation = false; } else if (val == IntVector2.Left && func(primaryPixelCollider.UpperLeft + pixelOffset) && func(primaryPixelCollider.LowerLeft + pixelOffset) && (!func(primaryPixelCollider.LowerRight + prevPixelOffset) || !func(primaryPixelCollider.UpperRight + prevPixelOffset))) { validLocation = false; } } } private void SetFireState(FireState state) { if (m_state != state) { EndState(m_state); m_state = state; BeginState(m_state); } } private void BeginState(FireState state) { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Expected O, but got Unknown //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Expected O, but got Unknown //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_045e: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Invalid comparison between Unknown and I4 //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) switch (state) { case FireState.Idle: ((BehaviorBase)this).m_aiActor.BehaviorOverridesVelocity = false; ((BehaviorBase)this).m_aiAnimator.LockFacingDirection = false; break; case FireState.Priming: ((BehaviorBase)this).m_aiAnimator.PlayUntilFinished(primeAnim, true, (string)null, -1f, false); ((BehaviorBase)this).m_aiActor.ClearPath(); ((BehaviorBase)this).m_aiActor.BehaviorOverridesVelocity = true; ((BehaviorBase)this).m_aiActor.BehaviorVelocity = Vector2.zero; break; case FireState.Charging: { AkSoundEngine.PostEvent("Play_ENM_cube_dash_01", ((Component)GameManager.Instance.PrimaryPlayer).gameObject); ((BehaviorBase)this).m_aiActor.ClearPath(); ((BehaviorBase)this).m_aiActor.BehaviorOverridesVelocity = true; AIActor aiActor = ((BehaviorBase)this).m_aiActor; Vector2 value = m_chargeDir.Value; aiActor.BehaviorVelocity = ((Vector2)(ref value)).normalized * chargeSpeed; float num = Vector2Extensions.ToAngle(((BehaviorBase)this).m_aiActor.BehaviorVelocity); ((BehaviorBase)this).m_aiAnimator.LockFacingDirection = true; ((BehaviorBase)this).m_aiAnimator.FacingDirection = num; ((BehaviorBase)this).m_aiActor.CollisionKnockbackStrength = chargeKnockback; ((BehaviorBase)this).m_aiActor.CollisionDamage = chargeDamage; if (Object.op_Implicit((Object)(object)hitVfx)) { VFXObject val = new VFXObject(); val.effect = hitVfx; VFXComplex val2 = new VFXComplex(); val2.effects = (VFXObject[])(object)new VFXObject[1] { val }; VFXPool val3 = new VFXPool(); val3.type = (VFXPoolType)4; val3.effects = (VFXComplex[])(object)new VFXComplex[1] { val2 }; ((BehaviorBase)this).m_aiActor.CollisionVFX = val3; } ((BehaviorBase)this).m_aiActor.PathableTiles = (CellTypes)6; if (switchCollidersOnCharge) { m_enemyCollider.CollisionLayer = (CollisionLayer)14; m_enemyHitbox.Enabled = false; m_projectileCollider.Enabled = true; } ((GameActor)((BehaviorBase)this).m_aiActor).DoDustUps = false; ((BehaviorBase)this).m_aiAnimator.PlayUntilFinished(chargeAnim, true, (string)null, -1f, false); if (Object.op_Implicit((Object)(object)launchVfx)) { SpawnManager.SpawnVFX(launchVfx, Vector2.op_Implicit(((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.UnitCenter), Quaternion.identity); } if (Object.op_Implicit((Object)(object)trailVfx)) { m_trailVfx = SpawnManager.SpawnParticleSystem(trailVfx, Vector2.op_Implicit(((BraveBehaviour)((BehaviorBase)this).m_aiActor).sprite.WorldCenter), Quaternion.Euler(0f, 0f, num)); if (Object.op_Implicit((Object)(object)trailVfxParent)) { m_trailVfx.transform.parent = trailVfxParent; } else { m_trailVfx.transform.parent = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).transform; } ParticleKiller component = m_trailVfx.GetComponent<ParticleKiller>(); if ((Object)(object)component != (Object)null) { component.Awake(); } } if (!string.IsNullOrEmpty(trailVfxString)) { Vector2 normalized = ((Vector2)(ref ((BehaviorBase)this).m_aiActor.BehaviorVelocity)).normalized; m_cachedTrailString = string.Format(arg0: (normalized.x > 0.75f) ? "right" : ((normalized.x < -0.75f) ? "left" : ((!(normalized.y > 0.75f)) ? "down" : "up")), format: trailVfxString); AIAnimator aiAnimator = ((BehaviorBase)this).m_aiAnimator; string cachedTrailString = m_cachedTrailString; Vector2? val4 = normalized; aiAnimator.PlayVfx(cachedTrailString, (Vector2?)null, val4, (Vector2?)null); } else { m_cachedTrailString = null; } ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.ForceRegenerate((bool?)null, (bool?)null); break; } case FireState.Bouncing: if (!string.IsNullOrEmpty(hitPlayerAnim) && m_hitPlayer) { ((BehaviorBase)this).m_aiAnimator.PlayUntilFinished(hitPlayerAnim, true, (string)null, -1f, false); if ((int)((BraveBehaviour)((BehaviorBase)this).m_aiAnimator).spriteAnimator.CurrentClip.wrapMode == 0) { ((BehaviorBase)this).m_aiAnimator.PlayForDuration(hitPlayerAnim, 1f, true, (string)null, -1f, false); } } else { ((BehaviorBase)this).m_aiAnimator.PlayUntilFinished(hitAnim, true, (string)null, -1f, false); } if (impactBulletScript != null && !impactBulletScript.IsNull && m_hitWall) { if (!Object.op_Implicit((Object)(object)m_bulletSource)) { m_bulletSource = GameObjectExtensions.GetOrAddComponent<BulletScriptSource>(shootPoint); } m_bulletSource.BulletManager = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).bulletBank; m_bulletSource.BulletScript = impactBulletScript; m_bulletSource.Initialize(); } break; } } private void EndState(FireState state) { //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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) if (state != FireState.Charging) { return; } ((BehaviorBase)this).m_aiActor.BehaviorVelocity = Vector2.zero; ((BehaviorBase)this).m_aiActor.CollisionKnockbackStrength = m_cachedKnockback; ((BehaviorBase)this).m_aiActor.CollisionDamage = m_cachedDamage; ((BehaviorBase)this).m_aiActor.CollisionVFX = m_cachedVfx; if (Object.op_Implicit((Object)(object)m_trailVfx)) { ParticleKiller component = m_trailVfx.GetComponent<ParticleKiller>(); if (Object.op_Implicit((Object)(object)component)) { component.StopEmitting(); } else { SpawnManager.Despawn(m_trailVfx); } m_trailVfx = null; } if (!string.IsNullOrEmpty(m_cachedTrailString)) { ((BehaviorBase)this).m_aiAnimator.StopVfx(m_cachedTrailString); m_cachedTrailString = null; } ((GameActor)((BehaviorBase)this).m_aiActor).DoDustUps = m_cachedDoDustUps; ((BehaviorBase)this).m_aiActor.PathableTiles = m_cachedPathableTiles; if (switchCollidersOnCharge) { m_enemyCollider.CollisionLayer = (CollisionLayer)3; m_enemyHitbox.Enabled = true; m_projectileCollider.Enabled = false; PhysicsEngine.Instance.RegisterOverlappingGhostCollisionExceptions(((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody, (int?)null, false); } } private bool ShouldChargePlayer(PlayerController player) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0128: 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_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) Vector2 val = ((BraveBehaviour)player).specRigidbody.GetUnitCenter((ColliderType)2); if (leadAmount > 0f) { Vector2 val2 = val + ((BraveBehaviour)player).specRigidbody.Velocity * m_primeAnimTime; val = Vector2.Lerp(val, val2, leadAmount); } Vector2 unitBottomLeft = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.UnitBottomLeft; Vector2 unitTopRight = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.UnitTopRight; m_chargeDir = null; if (BraveMathCollege.AABBContains(new Vector2(unitBottomLeft.x - chargeRange, unitBottomLeft.y), unitTopRight, val) && CanChargeLeft) { m_chargeDir = -Vector2.right; } else if (BraveMathCollege.AABBContains(unitBottomLeft, new Vector2(unitTopRight.x + chargeRange, unitTopRight.y), val) && CanChargeRight) { m_chargeDir = Vector2.right; } else if (BraveMathCollege.AABBContains(new Vector2(unitBottomLeft.x, unitBottomLeft.y - chargeRange), unitTopRight, val) && CanChargeDown) { m_chargeDir = -Vector2.up; } else if (BraveMathCollege.AABBContains(unitBottomLeft, new Vector2(unitTopRight.x, unitTopRight.y + chargeRange), val) && CanChargeUp) { m_chargeDir = Vector2.up; } return m_chargeDir.HasValue; } } public class CustomBeholsterLaserBehavior : BasicAttackBehavior { public enum StopType { None, All, Attack, Charge } private enum State { PreCharging, Charging, Firing } public enum FiringType { TOWARDS_PLAYER, TOWARDS_PLAYER_AND_NORTHANGLEVARIANCE, ONLY_NORTHANGLEVARIANCE, FACINGDIRECTION_AND_CLAMPED_ANGLE } public enum TrackingType { Follow, ConstantTurn } public bool hurtsOtherHealthhavers; public bool m_laserActive; public bool IsfiringLaser; public float AlaserAngle; public BasicBeamController m_laserBeam; public VFXPool chargeUpVfx; public VFXPool chargeDownVfx; public ProjectileModule beamModule; public Transform beamTransform; public bool DoesSpeedLerp; public bool DoesReverseSpeedLerp; public float InitialStartingSpeed; public float TimeToReachFullSpeed; public float TimeToStayAtZeroSpeedAt; public float EndingSpeed; public float TimeToReachEndingSpeed; public bool FacesLaserAngle; public TrackingType trackingType; public FiringType firingType; public float initialAimOffset; public float AdditionalHeightOffset; public float chargeTime; public float firingTime; public float maxTurnRate; public float turnRateAcceleration; public bool useDegreeCatchUp; public float minDegreesForCatchUp; public float degreeCatchUpSpeed; public bool useUnitCatchUp; public float minUnitForCatchUp; public float maxUnitForCatchUp; public float unitCatchUpSpeed; public bool useUnitOvershoot; public float minUnitForOvershoot; public float unitOvershootTime; public float unitOvershootSpeed; private State m_state; private float m_timer; public bool LocksFacingDirection; private Vector2 m_targetPosition; private float m_currentUnitTurnRate; private float m_unitOvershootFixedDirection; private float m_unitOvershootTimer; private SpeculativeRigidbody m_backupTarget; private BulletScriptSource m_bulletSource; public bool HasTriggeredScript; public BulletScriptSelector BulletScript; public Transform ShootPoint; public StopType StopDuring; public bool FiresDirectlyTowardsPlayer; public bool UsesCustomAngle; public float RampHeight; public string ChargeAnimation; public string FireAnimation; public string PostFireAnimation; public BeamSelection beamSelection; public List<AIBeamShooter2> specificBeamShooters; private List<AIBeamShooter2> m_allBeamShooters; private readonly List<AIBeamShooter2> m_currentBeamShooters = new List<AIBeamShooter2>(); public string LaserFiringSound; public string StopLaserFiringSound; public string EnemyChargeSound; public string BeamChargingSound; public bool UsesBaseSounds; public bool LockInPlaceWhileAttacking; public bool UsesBeamProjectileWithoutModule; public Vector2 LaserFiringCenter => Vector3Extensions.XY(((BraveBehaviour)((BehaviorBase)this).m_aiActor).transform.position); public bool FiringLaser => IsfiringLaser; public bool LaserActive => m_laserActive; public float LaserAngle => AlaserAngle; public BasicBeamController LaserBeam => m_laserBeam; public CustomBeholsterLaserBehavior() { RampHeight = 5f; LocksFacingDirection = true; DoesSpeedLerp = false; DoesReverseSpeedLerp = false; FacesLaserAngle = false; AdditionalHeightOffset = 0f; StopDuring = StopType.None; hurtsOtherHealthhavers = true; } public override void Start() { ((BasicAttackBehavior)this).Start(); ((BraveBehaviour)((BehaviorBase)this).m_aiActor).healthHaver.OnPreDeath += delegate { if ((Object)(object)m_laserBeam != (Object)null) { ((BeamController)m_laserBeam).DestroyBeam(); m_laserBeam = null; } if (BulletScript != null && Object.op_Implicit((Object)(object)m_bulletSource) && !m_bulletSource.IsEnded) { m_bulletSource.ForceStop(); } }; } private bool ShowSpecificBeamShooter() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 return (int)beamSelection == 2; } public void SetLaserAngle(float alaserAngle) { AlaserAngle = alaserAngle; if (IsfiringLaser) { ((BraveBehaviour)((BehaviorBase)this).m_aiActor).aiAnimator.FacingDirection = alaserAngle; } } public override void Upkeep() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) ((BasicAttackBehavior)this).Upkeep(); if (Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiActor.TargetRigidbody)) { m_targetPosition = ((BehaviorBase)this).m_aiActor.TargetRigidbody.GetUnitCenter((ColliderType)2); m_backupTarget = ((BehaviorBase)this).m_aiActor.TargetRigidbody; } else if (Object.op_Implicit((Object)(object)m_backupTarget)) { m_targetPosition = m_backupTarget.GetUnitCenter((ColliderType)2); } } public override BehaviorResult Update() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Invalid comparison between Unknown and I4 //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Invalid comparison between Unknown and I4 //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Invalid comparison between Unknown and I4 //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Invalid comparison between Unknown and I4 //IL_01be: Unknown result type (might be due to invalid IL or missing references) ((BasicAttackBehavior)this).Update(); BehaviorResult val = ((BasicAttackBehavior)this).Update(); if ((int)val > 0) { return val; } if (!((AttackBehaviorBase)this).IsReady()) { return (BehaviorResult)0; } PrechargeFiringLaser(); HasTriggeredScript = false; m_state = State.PreCharging; if (LockInPlaceWhileAttacking) { ((BehaviorBase)this).m_aiActor.SuppressTargetSwitch = true; ((BehaviorBase)this).m_aiActor.ClearPath(); } ((BehaviorBase)this).m_updateEveryFrame = true; m_allBeamShooters = new List<AIBeamShooter2>(((Component)((BehaviorBase)this).m_aiActor).GetComponents<AIBeamShooter2>()); if ((int)beamSelection == 0) { Component[] components = ((Component)((BehaviorBase)this).m_aiActor).gameObject.GetComponents(typeof(AIBeamShooter2)); for (int i = 0; i < components.Length; i++) { AIBeamShooter2 item = (AIBeamShooter2)(object)components[i]; m_currentBeamShooters.Add(item); } } else if ((int)beamSelection == 1) { m_currentBeamShooters.Add(BraveUtility.RandomElement<AIBeamShooter2>(m_allBeamShooters)); } else if ((int)beamSelection == 2) { foreach (AIBeamShooter2 specificBeamShooter in specificBeamShooters) { m_currentBeamShooters.Add(specificBeamShooter); } } if (!string.IsNullOrEmpty(ChargeAnimation)) { ((BehaviorBase)this).m_aiAnimator.PlayUntilCancelled(ChargeAnimation, true, (string)null, -1f, false); } if ((StopDuring == StopType.Charge) | (StopDuring == StopType.All)) { StopMoving(); } return (BehaviorResult)4; } public override ContinuousBehaviorResult ContinuousUpdate() { //IL_0002: 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_0553: Unknown result type (might be due to invalid IL or missing references) //IL_0557: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_052d: Unknown result type (might be due to invalid IL or missing references) ((BehaviorBase)this).ContinuousUpdate(); if (m_state == State.PreCharging) { if (!LaserActive) { ChargeFiringLaser(chargeTime); m_timer = 0f; m_state = State.Charging; } } else { if (m_state == State.Charging) { m_timer += ((BehaviorBase)this).m_deltaTime; if (m_timer >= chargeTime) { m_state = State.Firing; StartFiringTheLaser(); m_timer = 0f; } return (ContinuousBehaviorResult)0; } if (m_state == State.Firing) { if (FacesLaserAngle) { ((BehaviorBase)this).m_aiAnimator.LockFacingDirection = true; ((BehaviorBase)this).m_aiAnimator.FacingDirection = AlaserAngle; } if (!HasTriggeredScript) { HasTriggeredScript = true; if (BulletScript != null && !BulletScript.IsNull) { if (!Object.op_Implicit((Object)(object)m_bulletSource)) { m_bulletSource = GameObjectExtensions.GetOrAddComponent<BulletScriptSource>(((Component)ShootPoint).gameObject); } m_bulletSource.BulletManager = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).bulletBank; m_bulletSource.BulletScript = BulletScript; m_bulletSource.Initialize(); } } m_timer += ((BehaviorBase)this).m_deltaTime; if (m_timer >= firingTime || !FiringLaser) { if ((Object)(object)m_bulletSource != (Object)null) { m_bulletSource.ForceStop(); } ((BehaviorBase)this).m_aiAnimator.LockFacingDirection = false; return (ContinuousBehaviorResult)1; } for (int i = 0; i < m_currentBeamShooters.Count; i++) { if (m_currentBeamShooters[0].IsFiringLaser) { continue; } AIBeamShooter2 aIBeamShooter = m_currentBeamShooters[i]; Vector2 val = Vector2.op_Implicit(((BraveBehaviour)aIBeamShooter).transform.position); float alaserAngle; if (trackingType == TrackingType.Follow) { float num = Vector2.Distance(m_targetPosition, val); float num2 = Vector2Extensions.ToAngle(m_targetPosition - val); float num3 = BraveMathCollege.ClampAngle180(num2 - AlaserAngle); float num4 = num3 * num * ((float)Math.PI / 180f); float num5 = maxTurnRate; float num6 = Mathf.Sign(num3); if (m_unitOvershootTimer > 0f) { num6 = m_unitOvershootFixedDirection; m_unitOvershootTimer -= ((BehaviorBase)this).m_deltaTime; num5 = unitOvershootSpeed; } m_currentUnitTurnRate = Mathf.Clamp(m_currentUnitTurnRate + num6 * turnRateAcceleration * ((BehaviorBase)this).m_deltaTime, 0f - num5, num5); float num7 = m_currentUnitTurnRate / num * 57.29578f; float num8 = 0f; if (useDegreeCatchUp && Mathf.Abs(num3) > minDegreesForCatchUp) { float num9 = Mathf.InverseLerp(minDegreesForCatchUp, 180f, Mathf.Abs(num3)) * degreeCatchUpSpeed; num8 = Mathf.Max(num8, num9); } if (useUnitCatchUp && Mathf.Abs(num4) > minUnitForCatchUp) { float num10 = Mathf.InverseLerp(minUnitForCatchUp, maxUnitForCatchUp, Mathf.Abs(num4)) * unitCatchUpSpeed; float num11 = num10 / num * 57.29578f; num8 = Mathf.Max(num8, num11); } if (useUnitOvershoot && Mathf.Abs(num4) < minUnitForOvershoot) { m_unitOvershootFixedDirection = ((!(m_currentUnitTurnRate <= 0f)) ? 1 : (-1)); m_unitOvershootTimer = unitOvershootTime; } num8 *= Mathf.Sign(num3); alaserAngle = BraveMathCollege.ClampAngle360(AlaserAngle + (num7 + num8) * ((BehaviorBase)this).m_deltaTime); } else { float num12 = maxTurnRate; if (DoesSpeedLerp) { float num13 = m_timer / TimeToReachFullSpeed - TimeToStayAtZeroSpeedAt; num13 = Mathf.Max(num13, 0f); num12 = Mathf.Lerp(InitialStartingSpeed, maxTurnRate, Mathf.Min(num13, 1f)); } if (DoesReverseSpeedLerp) { float num14 = firingTime - TimeToStayAtZeroSpeedAt - TimeToReachEndingSpeed; float num15 = firingTime - TimeToStayAtZeroSpeedAt; if (m_timer > num14) { num12 = Mathf.Lerp(EndingSpeed, maxTurnRate, num15 - m_timer); } } alaserAngle = BraveMathCollege.ClampAngle360(AlaserAngle + num12 * ((BehaviorBase)this).m_deltaTime); } if (IsfiringLaser) { AlaserAngle = alaserAngle; } return (ContinuousBehaviorResult)0; } } } return (ContinuousBehaviorResult)0; } public override void EndContinuousUpdate() { ((BehaviorBase)this).EndContinuousUpdate(); if ((Object)(object)m_bulletSource != (Object)null && !m_bulletSource.IsEnded) { m_bulletSource.ForceStop(); } if (!string.IsNullOrEmpty(FireAnimation)) { ((BehaviorBase)this).m_aiAnimator.EndAnimationIf(FireAnimation); } StopFiringLaser(); ((BehaviorBase)this).m_aiAnimator.LockFacingDirection = false; ((BehaviorBase)this).m_aiActor.SuppressTargetSwitch = false; ((BehaviorBase)this).m_updateEveryFrame = false; ((BasicAttackBehavior)this).UpdateCooldowns(); } public override bool IsOverridable() { return false; } public void PrechargeFiringLaser() { if (LocksFacingDirection) { ((BraveBehaviour)((BehaviorBase)this).m_aiActor).aiAnimator.LockFacingDirection = true; } if (EnemyChargeSound != null && !UsesBaseSounds) { AkSoundEngine.PostEvent(EnemyChargeSound, ((Component)((BehaviorBase)this).m_aiActor).gameObject); } else if (UsesBaseSounds) { AkSoundEngine.PostEvent("Play_ENM_beholster_charging_01", ((Component)((BehaviorBase)this).m_aiActor).gameObject); } } public void ChargeFiringLaser(float time) { if (BeamChargingSound != null && !UsesBaseSounds) { AkSoundEngine.PostEvent(BeamChargingSound, ((Component)((BehaviorBase)this).m_aiActor).gameObject); } else if (UsesBaseSounds) { AkSoundEngine.PostEvent("Play_ENM_beholster_charging_01", ((Component)((BehaviorBase)this).m_aiActor).gameObject); } m_laserActive = true; } public void StartFiringTheLaser() { if ((StopDuring == StopType.Attack) | (StopDuring == StopType.All)) { StopMoving(StopDuring == StopType.All); } MonoBehaviour component = ((Component)((BehaviorBase)this).m_aiActor).GetComponent<MonoBehaviour>(); if (!string.IsNullOrEmpty(FireAnimation)) { ((BehaviorBase)this).m_aiAnimator.PlayUntilCancelled(FireAnimation, true, (string)null, -1f, false); } float facingDirection = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).aiAnimator.FacingDirection; if (LocksFacingDirection) { ((BraveBehaviour)((BehaviorBase)this).m_aiActor).aiAnimator.LockFacingDirection = true; } SetLaserAngle(facingDirection); IsfiringLaser = true; for (int i = 0; i < m_currentBeamShooters.Count; i++) { AIBeamShooter2 aibeamShooter = m_currentBeamShooters[i]; component.StartCoroutine(FireBeam(aibeamShooter)); } } public void StopFiringLaser() { if (IsfiringLaser) { if (!string.IsNullOrEmpty(PostFireAnimation)) { ((BehaviorBase)this).m_aiAnimator.PlayUntilFinished(PostFireAnimation, true, (string)null, -1f, false); } base.m_behaviorSpeculator.PreventMovement = false; m_laserActive = false; IsfiringLaser = false; ((BraveBehaviour)((BehaviorBase)this).m_aiActor).aiAnimator.LockFacingDirection = false; m_currentBeamShooters.Clear(); } } public IEnumerator FireBeam(AIBeamShooter2 aibeamShooter2) { GameObject beamObject = ((!UsesBeamProjectileWithoutModule) ? Object.Instantiate<GameObject>(((Component)aibeamShooter2.beamModule.GetCurrentProjectile()).gameObject) : Object.Instantiate<GameObject>(((Component)aibeamShooter2.beamProjectile).gameObject)); if ((Object)(object)beamObject == (Object)null) { ETGModConsole.Log((object)"CANNOT FIND beamObject!", false); StopFiringLaser(); yield break; } BasicBeamController beamCont = beamObject.GetComponent<BasicBeamController>(); List<AIActor> activeEnemies = ((BehaviorBase)this).m_aiActor.ParentRoom.GetActiveEnemies((ActiveEnemyType)0); for (int i = 0; i < activeEnemies.Count; i++) { AIActor aiactor = activeEnemies[i]; if (Object.op_Implicit((Object)(object)aiactor) && (Object)(object)aiactor != (Object)(object)((BehaviorBase)this).m_aiActor && Object.op_Implicit((Object)(object)((BraveBehaviour)aiactor).healthHaver)) { ((BeamController)beamCont).IgnoreRigidbodes.Add(((BraveBehaviour)aiactor).specRigidbody); } } ((BeamController)beamCont).Owner = (GameActor)(object)((BehaviorBase)this).m_aiActor; ((BeamController)beamCont).HitsPlayers = true; ((BeamController)beamCont).HitsEnemies = true; if (UsesBaseSounds) { LaserFiringSound = "Play_ENM_deathray_shot_01"; } else if (LaserFiringSound != null && !UsesBaseSounds) { beamCont.startAudioEvent = LaserFiringSound; } if (StopLaserFiringSound != null && !UsesBaseSounds) { beamCont.endAudioEvent = StopLaserFiringSound; } else if (UsesBaseSounds) { beamCont.endAudioEvent = "Stop_ENM_deathray_loop_01"; } beamCont.HeightOffset = 0f; beamCont.RampHeightOffset = 0f; beamCont.ContinueBeamArtToWall = true; float enemyTickCooldown = 0f; beamCont.OverrideHitChecks = delegate(SpeculativeRigidbody hitRigidbody, Vector2 dirVec) { //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) Projectile val = null; val = ((!UsesBeamProjectileWithoutModule) ? aibeamShooter2.beamModule.GetCurrentProjectile() : aibeamShooter2.beamProjectile); HealthHaver val2 = ((!Object.op_Implicit((Object)(object)hitRigidbody)) ? null : ((BraveBehaviour)hitRigidbody).healthHaver); if (Object.op_Implicit((Object)(object)hitRigidbody) && Object.op_Implicit((Object)(object)((BraveBehaviour)hitRigidbody).projectile) && Object.op_Implicit((Object)(object)((Component)hitRigidbody).GetComponent<BeholsterBounceRocket>())) { BounceProjModifier component = ((Component)hitRigidbody).GetComponent<BounceProjModifier>(); if (Object.op_Implicit((Object)(object)component)) { component.numberOfBounces = 0; } ((BraveBehaviour)hitRigidbody).projectile.DieInAir(false, true, true, false); } bool flag = (Object)(object)((Component)hitRigidbody).GetComponent<PlayerController>() != (Object)null && ((BeamController)beamCont).HitsPlayers; if ((hurtsOtherHealthhavers | Object.op_Implicit((Object)(object)beamCont)) && (Object)(object)val2 != (Object)null) { if (Object.op_Implicit((Object)(object)((BraveBehaviour)val2).aiActor)) { if (enemyTickCooldown <= 0f) { val2.ApplyDamage(ProjectileData.FixedFallbackDamageToEnemies, dirVec, ((BehaviorBase)this).m_aiActor.GetActorName(), val.damageTypes, (DamageCategory)0, false, (PixelCollider)null, false); enemyTickCooldown = 0.1f; } } else { val2.ApplyDamage(val.baseData.damage, dirVec, ((BehaviorBase)this).m_aiActor.GetActorName(), val.damageTypes, (DamageCategory)0, false, (PixelCollider)null, false); } } if (Object.op_Implicit((Object)(object)((BraveBehaviour)hitRigidbody).majorBreakable)) { ((BraveBehaviour)hitRigidbody).majorBreakable.ApplyDamage(26f * BraveTime.DeltaTime, dirVec, false, false, false); } }; _ = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).aiAnimator.FacingDirection; if (firingType == FiringType.ONLY_NORTHANGLEVARIANCE) { AlaserAngle = 0f; } bool firstFrame = true; while ((Object)(object)beamCont != (Object)null && IsfiringLaser) { enemyTickCooldown = Mathf.Max(enemyTickCooldown - BraveTime.DeltaTime, 0f); float clampedAngle = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).aiAnimator.FacingDirection; if (firingType == FiringType.TOWARDS_PLAYER) { clampedAngle = AlaserAngle; } else if (firingType == FiringType.TOWARDS_PLAYER_AND_NORTHANGLEVARIANCE) { clampedAngle = BraveMathCollege.ClampAngle360(aibeamShooter2.northAngleTolerance) + AlaserAngle; } else if (firingType == FiringType.ONLY_NORTHANGLEVARIANCE) { clampedAngle = BraveMathCollege.ClampAngle360(aibeamShooter2.northAngleTolerance) + AlaserAngle; } else if (firingType == FiringType.FACINGDIRECTION_AND_CLAMPED_ANGLE) { clampedAngle += BraveMathCollege.ClampAngle360(aibeamShooter2.northAngleTolerance); } beamCont.RampHeightOffset = RampHeight; Vector3 dirVec2 = new Vector3(Mathf.Cos(clampedAngle * ((float)Math.PI / 180f)), Mathf.Sin(clampedAngle * ((float)Math.PI / 180f)), 0f) * 10f; Vector2 startingPoint = Vector2.op_Implicit(aibeamShooter2.beamTransform.position); if (aibeamShooter2.firingEllipseA != 0f && aibeamShooter2.firingEllipseB != 0f) { startingPoint = GetTrueLaserOrigin(aibeamShooter2, clampedAngle); } bool facingNorth = BraveMathCollege.ClampAngle180(Vector2Extensions.ToAngle(((BeamController)beamCont).Direction)) > 0f; beamCont.RampHeightOffset = (float)((!facingNorth) ? 5 : 0) + AdditionalHeightOffset; ((BeamController)beamCont).Origin = startingPoint; ((BeamController)beamCont).Direction = Vector2.op_Implicit(dirVec2); aibeamShooter2.m_laserBeam = beamCont; if (firstFrame) { yield return null; firstFrame = false; continue; } if ((Object)(object)((BehaviorBase)this).m_aiActor == (Object)null && (Object)(object)beamCont != (Object)null) { ((BeamController)beamCont).CeaseAttack(); aibeamShooter2.m_laserBeam = null; break; } ((BeamController)beamCont).LateUpdatePosition(Vector2.op_Implicit(startingPoint)); yield return null; if (IsfiringLaser && !Object.op_Implicit((Object)(object)beamCont)) { StopFiringLaser(); aibeamShooter2.m_laserBeam = null; break; } if (!IsfiringLaser && Object.op_Implicit((Object)(object)beamCont)) { ((BeamController)beamCont).CeaseAttack(); aibeamShooter2.m_laserBeam = null; StopFiringLaser(); break; } while (Time.timeScale == 0f) { yield return null; } } if (!IsfiringLaser && (Object)(object)beamCont != (Object)null) { aibeamShooter2.m_laserBeam = null; ((BeamController)beamCont).CeaseAttack(); beamCont = null; } } private Vector2 GetTrueLaserOrigin(AIBeamShooter2 aIBeamShooter2, float laserAngle) { //IL_0002: 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_001a: 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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: 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_00c3: Unknown result type (might be due to invalid IL or missing references) Vector2 laserFiringCenter = aIBeamShooter2.LaserFiringCenter; Bounds bounds = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).sprite.GetBounds(); float x = ((Bounds)(ref bounds)).size.x; bounds = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).sprite.GetBounds(); Vector2 val = laserFiringCenter - new Vector2(x, ((Bounds)(ref bounds)).size.y) / 2f; if (aIBeamShooter2.firingEllipseA != 0f && aIBeamShooter2.firingEllipseB != 0f) { float num = Mathf.Lerp(aIBeamShooter2.eyeballFudgeAngle, 0f, BraveMathCollege.AbsAngleBetween(90f, Mathf.Abs(BraveMathCollege.ClampAngle180(laserAngle))) / 90f); val = BraveMathCollege.GetEllipsePoint(val, aIBeamShooter2.firingEllipseA, aIBeamShooter2.firingEllipseB, laserAngle + num); } return val; } private void StopMoving(bool PreventMoveMent = true) { if (Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiActor)) { ((BehaviorBase)this).m_aiActor.ClearPath(); base.m_behaviorSpeculator.PreventMovement = PreventMoveMent; } } } public class InjectorRoundsComponent : BraveBehaviour { public float GoopPoolSize; public InjectorRoundsComponent() { GoopPoolSize = 2.5f; } public void Start() { ((BraveBehaviour)this).healthHaver.OnPreDeath += OnPreDeath; } public override void OnDestroy() { if (Object.op_Implicit((Object)(object)((BraveBehaviour)this).healthHaver)) { ((BraveBehaviour)this).healthHaver.OnPreDeath -= OnPreDeath; } ((BraveBehaviour)this).OnDestroy(); } public bool ContainsSpecificValue(GameActorEffect gameActorEffect) { if (InjectorRounds.DebuffKeys.ContainsKey(gameActorEffect)) { return true; } if (InjectorRounds.DebuffKeys.ContainsValue(gameActorEffect.effectIdentifier)) { return true; } return false; } private void OnPreDeath(Vector2 obj) { //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_0437: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) Dictionary<string, GameActorEffect> dictionary = new Dictionary<string, GameActorEffect>(); List<string> list = new List<string>(); List<GameActorEffect> list2 = PlanetsideReflectionHelper.ReflectGetField<List<GameActorEffect>>(typeof(AIActor), "m_activeEffects", ((BraveBehaviour)this).aiActor); foreach (GameActorEffect item in list2) { if (item != null && item.effectIdentifier != null && InjectorRounds.BlacklistedNames.Contains(item.effectIdentifier)) { continue; } if (item != null && InjectorRounds.DebuffKeys.ContainsKey(item) && !InjectorRounds.BlacklistedKeys.Contains(item)) { string value = item.effectIdentifier ?? "H"; InjectorRounds.DebuffKeys.TryGetValue(item, out value); if (value != null && value.ToLower() != "h") { list.Add(value); } } else { if (((object)item).GetType().IsSubclassOf(typeof(GameActorDecorationEffect))) { continue; } string text = ((item.effectIdentifier != null) ? item.effectIdentifier : Random.Range(1, 1000).ToString()); if (item.effectIdentifier != null && !InjectorRounds.BlacklistedNames.Contains(item.effectIdentifier)) { list.Add(text); if (!dictionary.ContainsKey(text)) { dictionary.Add(text, item); } if (!InjectorRounds.DebuffKeys.ContainsKey(item)) { InjectorRounds.DebuffKeys.Add(item, item.effectIdentifier); } } } } if (list.Count <= 0 || list == null) { return; } string text2 = BraveUtility.RandomElement<string>(list); if (text2 == null) { return; } if (InjectorRounds.GoopKeys.ContainsKey(text2)) { GoopDefinition value2 = null; InjectorRounds.GoopKeys.TryGetValue(text2, out value2); if ((Object)(object)value2 != (Object)null) { DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(value2).TimedAddGoopCircle(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldBottomCenter, GoopPoolSize, 0.5f, false); } } else { if (!InjectorRounds.DebuffKeys.ContainsValue(text2)) { return; } GameActorEffect value3 = null; dictionary.TryGetValue(text2, out value3); if (value3 != null) { GoopDefinition templateDef = InjectorRounds.templateDef; templateDef.damagesEnemies = true; ((Object)templateDef).name = value3.effectIdentifier + " Dupe Goop"; if (value3 is GameActorHealthEffect) { templateDef.HealthModifierEffect = (GameActorHealthEffect)(object)((value3 is GameActorHealthEffect) ? value3 : null); templateDef.AppliesDamageOverTime = true; } if (value3 is GameActorSpeedEffect) { templateDef.SpeedModifierEffect = (GameActorSpeedEffect)(object)((value3 is GameActorSpeedEffect) ? value3 : null); templateDef.AppliesSpeedModifier = true; } if (value3 is GameActorCharmEffect) { templateDef.CharmModifierEffect = (GameActorCharmEffect)(object)((value3 is GameActorCharmEffect) ? value3 : null); templateDef.AppliesCharm = true; } if (value3 is GameActorCheeseEffect) { templateDef.CheeseModifierEffect = (GameActorCheeseEffect)(object)((value3 is GameActorCheeseEffect) ? value3 : null); templateDef.AppliesCheese = true; } if (value3 is GameActorFireEffect) { templateDef.fireEffect = (GameActorFireEffect)(object)((value3 is GameActorFireEffect) ? value3 : null); templateDef.fireBurnsEnemies = true; } _ = value3.TintColor; if (true) { Color val = value3.TintColor * 255f; byte b = (byte)val.r; byte b2 = (byte)val.g; byte b3 = (byte)val.b; templateDef.baseColor32 = new Color32(b, b2, b3, byte.MaxValue); } templateDef.CanBeIgnited = false; templateDef.damagePerSecondtoEnemies = 0f; templateDef.damagesPlayers = false; templateDef.AppliesDamageOverTime = false; templateDef.damageToPlayers = 0f; templateDef.lifespan = Mathf.Max(7f, value3.duration); DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(templateDef).TimedAddGoopCircle(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldBottomCenter, GoopPoolSize, 0.5f, false); } } } } public class ShamberController : BraveBehaviour { public class ShamberCont { public Projectile projectile; public float s; public float speed; public float Radius = 1.5f; } private ParticleSystem particle; private List<ShamberCont> m_bulletPositions = new List<ShamberCont>(); public void Start() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown //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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) tk2dSpriteAnimator spriteAnimator = ((BraveBehaviour)((BraveBehaviour)this).aiActor).spriteAnimator; spriteAnimator.AnimationEventTriggered = (Action<tk2dSpriteAnimator, tk2dSpriteAnimationClip, int>)Delegate.Combine(spriteAnimator.AnimationEventTriggered, new Action<tk2dSpriteAnimator, tk2dSpriteAnimationClip, int>(An